-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CI] Add release workflow/job and publish-latest job
The new release workflow uses action "pipe-cd/actions-gh-release". This action uses file RELEASE in the root. When that file is modified in a PR, and contains a new release tag, it will trigger a release upon the PR being merged. The action will create a git tag in the repo and the corresponding GitHub release, containing auto-generated release notes, that can be later edited by a committer. The new release will in turn trigger the new "publish-latest" job (ci-cd workflow), which will publish the new version of the package to npm. Signed-off-by: Marc Dumais <marc.dumais@ericsson.com>
- Loading branch information
1 parent
78f19d5
commit 126b406
Showing
4 changed files
with
92 additions
and
20 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
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,37 @@ | ||
name: Create or prepare GitHub release | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- 'RELEASE' | ||
pull_request: | ||
types: [opened, synchronize] | ||
branches: | ||
- master | ||
paths: | ||
- 'RELEASE' | ||
|
||
jobs: | ||
gh-release: | ||
name: GitHub release | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: pipe-cd/actions-gh-release@v2.6.0 | ||
with: | ||
release_file: 'RELEASE' | ||
# Actions that run using the auto-generated GitHub token are | ||
# not allowed to trigger a new workflow run. In this case we want | ||
# the tag created by actions-gh-release to re-trigger the main workflow | ||
# and result in publishing the package to npm. | ||
# The following scopes are required when creating the committer token: | ||
# - repo:status, repo_deployment, public_repo, read:org | ||
# See here for more details: | ||
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow | ||
token: ${{ secrets.GH_COMMITTER_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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
tag: v0.0.0 | ||
|
||
commitInclude: | ||
parentOfMergeCommit: true | ||
|
||
releaseNoteGenerator: | ||
showAbbrevHash: true | ||
showCommitter: false |
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