Skip to content

Commit 50e2da7

Browse files
Add release workflows (#4)
* Add release-npm workflow * Add release-github workflow
1 parent 201bd8c commit 50e2da7

File tree

2 files changed

+59
-0
lines changed

2 files changed

+59
-0
lines changed

.github/workflows/release-github.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Release on github
2+
3+
on:
4+
push:
5+
branches:
6+
- release/*
7+
8+
jobs:
9+
10+
pre-release-check:
11+
uses: cucumber/.github/.github/workflows/prerelease-checks.yml@main
12+
13+
create-github-release:
14+
name: Create GitHub Release and Git tag
15+
needs: [pre-release-check]
16+
runs-on: ubuntu-latest
17+
environment: Release
18+
permissions:
19+
contents: write
20+
21+
steps:
22+
- uses: actions/checkout@v3
23+
- uses: cucumber/[email protected]
24+
with:
25+
github-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release-npm.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Release npm module
2+
3+
on:
4+
push:
5+
branches:
6+
- release/*
7+
8+
jobs:
9+
pre-release-check:
10+
uses: cucumber/.github/.github/workflows/prerelease-checks.yml@main
11+
12+
test-javascript:
13+
uses: ./.github/workflows/test.yml
14+
15+
publish-npm:
16+
name: Publish NPM module
17+
needs: [pre-release-check, test-javascript]
18+
runs-on: ubuntu-latest
19+
environment: Release
20+
21+
steps:
22+
- uses: actions/checkout@v3
23+
24+
- uses: actions/setup-node@v3
25+
with:
26+
node-version: "17"
27+
cache: "npm"
28+
cache-dependency-path: package-lock.json
29+
30+
- run: npm install-ci-test
31+
32+
- uses: cucumber/[email protected]
33+
with:
34+
npm-token: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)