-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add a release GHA workflow * Remove restriction on environment for testing purpose * Copy latest version from ci-environment * Remove prerelease check for testing purpose * Uncomment workflow steps * Add RELEASING.md file
- Loading branch information
1 parent
cb312cf
commit eff4591
Showing
4 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Pre-release checks | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
|
||
check-commit-ancestor: | ||
name: Check commit ancestor | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Check commit has been pushed on origin/main | ||
run: | | ||
git fetch --quiet origin main | ||
git merge-base --is-ancestor HEAD origin/main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Release npm module | ||
|
||
on: | ||
push: | ||
branches: | ||
- release/* | ||
|
||
jobs: | ||
|
||
pre-release-check: | ||
uses: cucumber/cucumber-react/.github/workflows/prerelease-checks.yml@add-release-workflow | ||
|
||
test: | ||
uses: cucumber/cucumber-react/.github/workflows/test.yml@add-release-workflow | ||
|
||
publish-npm: | ||
name: Publish NPM module | ||
needs: [pre-release-check, test] | ||
runs-on: ubuntu-latest | ||
environment: Release | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '16' | ||
cache: 'npm' | ||
cache-dependency-path: package-lock.json | ||
|
||
- run: npm install-ci-test | ||
|
||
- run: npm run compile | ||
|
||
- uses: cucumber/[email protected] | ||
with: | ||
npm-token: ${{ secrets.NPM_TOKEN }} | ||
|
||
create-github-release: | ||
name: Create GitHub Release and Git tag | ||
needs: [publish-npm] | ||
runs-on: ubuntu-latest | ||
environment: Release | ||
permissions: | ||
contents: write | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: cucumber/[email protected] | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ on: | |
pull_request: | ||
branches: | ||
- main | ||
workflow_call: | ||
|
||
jobs: | ||
test: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
See [.github/RELEASING](https://github.com/cucumber/.github/blob/main/RELEASING.md). |