-
-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[`standard-version`](https://github.com/conventional-changelog/standard-version/) has been deprecated since May 2022, so it is necessary to stop using it for this project. [**`semantic-release`**](https://github.com/semantic-release/semantic-release) is available as a more capable alternative to help automate the release process: 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 need to do this step manually in such cases. Whenever a commit is pushed to the release branch (`production`), all of the above release processes will be triggered.
- 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/workflows/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.