Skip to content

swap to vercel/ncc #166

swap to vercel/ncc

swap to vercel/ncc #166

Workflow file for this run

name: Build and package GitHub Action
on:
push
jobs:
build-action-dist:
runs-on: ubuntu-latest
steps:
- name: Get the current branch name
shell: bash
run: echo "::set-output name=branch::${GITHUB_REF#refs/heads/}"
id: myref
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: npm
- run: npm install
- run: npm run-script build-action
- uses: EndBug/add-and-commit@v7 # You can change this to use a specific version
with:
# The arguments for the `git add` command (see the paragraph below for more info)
# Default: '.'
add: 'dist'
# The message for the commit
# Default: 'Commit from GitHub Actions (name of the workflow)'
message: 'dist release 📦 - created via Actions'
# The flag used on the pull strategy
# Default: '--no-rebase'
# pull_strategy: '--no-rebase or --no-ff or --rebase'
# Whether to push the commit and, if any, its tags to the repo. It can also be used to set the git push arguments (see the paragraph below for more info)
# Default: true
#push: false
# Whether to use the --signoff option on `git commit` (only `true` and `false` are accepted)
# Default: false
# signoff: true
# Arguments for the git tag command (the tag name always needs to be the first word not preceded by an hyphen)
# Default: ''
# tag: 'v1.0.0 --force'
#- uses: tool3/ncc@master <---- dones't work with non-main branch
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# src: 'index.js'
# branch: ${{ steps.myref.outputs.branch }} #<--- problem with how they fetch head....