-
Notifications
You must be signed in to change notification settings - Fork 24
49 lines (43 loc) · 1.84 KB
/
action-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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....