Skip to content

Commit a5f745b

Browse files
committed
ci: use commit message format for release trigger instead of tags
1 parent 5f42e92 commit a5f745b

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

.github/workflows/main.yml

+14-14
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@ jobs:
1515
os: [macos-latest, ubuntu-latest, windows-latest]
1616
runs-on: ${{ matrix.os }}
1717
steps:
18-
- name: Checkout
19-
uses: actions/checkout@v3
20-
- name: Install Node.js
21-
uses: actions/setup-node@v3
22-
with:
23-
node-version: 16.x
24-
cache: 'yarn'
25-
- run: yarn install
26-
- run: xvfb-run -a yarn test
27-
if: runner.os == 'Linux'
28-
- run: yarn test
29-
if: runner.os != 'Linux'
18+
- name: Checkout
19+
uses: actions/checkout@v3
20+
- name: Install Node.js
21+
uses: actions/setup-node@v3
22+
with:
23+
node-version: 16.x
24+
cache: 'yarn'
25+
- run: yarn install
26+
- run: xvfb-run -a yarn test
27+
if: runner.os == 'Linux'
28+
- run: yarn test
29+
if: runner.os != 'Linux'
3030
package:
3131
runs-on: ubuntu-latest
3232
needs: test
@@ -45,7 +45,7 @@ jobs:
4545
name: package
4646
path: ./${{ env.PACKAGE_NAME }}
4747
release:
48-
if: startsWith(github.ref, 'refs/tags/')
48+
if: startsWith(github.event.head_commit.message, 'release v')
4949
runs-on: ubuntu-latest
5050
permissions:
5151
contents: write
@@ -76,4 +76,4 @@ jobs:
7676
uses: ncipollo/release-action@v1
7777
with:
7878
body: ${{ steps.changelog.outputs.changes }}
79-
artifacts: ./${{ env.RELEASE_NAME }}
79+
artifacts: ./${{ env.RELEASE_NAME }}

0 commit comments

Comments
 (0)