Skip to content

Commit

Permalink
CI: Automate release on merges of Release PR
Browse files Browse the repository at this point in the history
Tag and push a new release once the CHANGELOG changes are merged back
into `main` branch.

Pending building binaries and attaching the artifacts to the release.
  • Loading branch information
luislavena committed Aug 4, 2024
1 parent 32ef6a7 commit 38c3b1e
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changes/unreleased/internal-20240804-121037.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
kind: internal
body: Automate release on merge of Release PR
time: 2024-08-04T12:10:37.508443+02:00
custom:
Issue: ""
39 changes: 39 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Release

on:
push:
branches:
- main
paths:
- CHANGELOG.md

jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Get the latest version
id: latest
uses: miniscruff/changie-action@v2
with:
args: latest

- name: Create tag
run: |
git config user.name "GitHub Actions Bot"
git config user.email "<>"
git tag -a ${{ steps.latest.outputs.output }} -m "Release ${{ steps.latest.outputs.output }}"
git push --tags
- name: Create release
uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
name: ${{ steps.latest.outputs.output }}
tag_name: ${{ steps.latest.outputs.output }}
body_path: .changes/${{ steps.latest.outputs.output }}.md
# TODO: include release binaries

0 comments on commit 38c3b1e

Please sign in to comment.