-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (29 loc) · 1.03 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: Release
on:
push:
branches: main
permissions:
contents: write
# To release a new version, update the version in `project.toml` and push to main.
# This will create a draft release with the changelog and push a 'vx' tag that points to the new release as well as 'vx.y.z'.
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: quantco/ui-actions/version-metadata@v1
id: version-metadata
with:
file: ./project.toml
token: ${{ secrets.GITHUB_TOKEN }}
version-extraction-override: 'regex:version = "(.*)"'
- run: .github/scripts/release.sh
if: steps.version-metadata.outputs.changed == 'true'
env:
TAG_NAME: v${{ steps.version-metadata.outputs.newVersion }}
- name: Create release
if: steps.version-metadata.outputs.changed == 'true'
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
tag_name: v${{ steps.version-metadata.outputs.newVersion }}