-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(release): replace
standard-version
with semantic-release
With the more powerful `semantic-release` we can fully automate the release of new versions: 1. Updating Node/Gem version numbers 2. Generating changelogs 3. Automating GitHub Releases 4. Building Chirpy-gem and pushing it to RubyGems.org 5. Create commits and tags on the `production` branch 6. Merge the `production` branch into the `master` branch Note: Step 6 may be canceled in CD environments due to merge conflicts, so we will need to do this step manually.
- Loading branch information
Showing
5 changed files
with
193 additions
and
125 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 |
---|---|---|
@@ -1,17 +1,37 @@ | ||
name: CD | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v[0-9]+.[0-9]+.[0-9]+" | ||
branches: | ||
- docs | ||
- production | ||
tags-ignore: | ||
- "**" | ||
|
||
jobs: | ||
launch: | ||
release: | ||
permissions: | ||
contents: write | ||
issues: write | ||
pull-requests: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: | | ||
curl -X POST -H "Accept: application/vnd.github+json" \ | ||
-H "Authorization: Bearer ${{ secrets.GH_PAT }}" \ | ||
https://api.github.com/repos/${{ secrets.BUILDER }}/dispatches \ | ||
-d '{"event_type":"deploy", "client_payload":{"branch": "${{ github.ref_name }}"}}' | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 3.2 | ||
bundler-cache: true | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: latest | ||
|
||
- run: npm install | ||
- run: npx semantic-release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GEM_HOST_API_KEY: ${{ secrets.GEM_HOST_API_KEY }} | ||
|
||
publish: | ||
needs: release | ||
uses: ./.github/actions/publish.yml |
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,17 @@ | ||
name: Publish | ||
|
||
on: | ||
push: | ||
branches: | ||
- docs | ||
workflow_call: | ||
|
||
jobs: | ||
launch: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: | | ||
curl -X POST -H "Accept: application/vnd.github+json" \ | ||
-H "Authorization: Bearer ${{ secrets.GH_PAT }}" \ | ||
https://api.github.com/repos/${{ secrets.BUILDER }}/dispatches \ | ||
-d '{"event_type":"deploy", "client_payload":{"branch": "${{ github.ref_name }}"}}' |
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
Oops, something went wrong.