Skip to content

Commit

Permalink
Add workflow used to automatically create GitHub releases
Browse files Browse the repository at this point in the history
The new workflow uses a "RELEASE" file to create, when required, new
release tags and GitHub releases. It uses the following GutHub action:

https://github.com/pipe-cd/actions-gh-release

---

With this in place, the release strategy would be to:
- publish to npm locally. As part of publishing, the package's
  version will be stepped in package.json. Create a commit for
  that change and also add/update the RELEASE file (*) with
  corresponding tag.
- push that commit for review to the GitHub project
  - The GitHub action will add a preview of the Github release
    to be created upon merging
- once merged, the new tag and automatically-generated
  GitHub release will be created, that correspond to the
  published npm pacakge

(*) https://github.com/pipe-cd/actions-gh-release#usage

Signed-off-by: Marc Dumais <[email protected]>
  • Loading branch information
marcdumais-work committed Jan 18, 2024
1 parent 3bd3e15 commit 7a2bc79
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/gh-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
on:
push:
branches:
- main
paths:
- 'RELEASE'
pull_request:
types: [opened, synchronize]
branches:
- main
paths:
- 'RELEASE'

jobs:
gh-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: pipe-cd/[email protected]
with:
release_file: 'RELEASE'
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 7a2bc79

Please sign in to comment.