-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (64 loc) · 1.83 KB
/
release.yaml
File metadata and controls
76 lines (64 loc) · 1.83 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Production Release
on:
push:
tags:
- "*.*.*"
jobs:
verify:
name: Verify project state
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Run workspace setup
uses: ./.github/actions/setup-workspace
- name: Run tests
run: |
just test
deploy:
name: Deploy new release
runs-on: ubuntu-latest
needs: verify
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Run setup
uses: ./.github/actions/setup-workspace
- name: Set version
id: set-version
run: |
export VERSION=$(jq -r .version specs.json)
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Set up GitHub CLI
shell: bash
run: |
sudo apt update
sudo apt install gh -y
gh --version
- name: Generate changelog
id: changelog
run: |
SPEC_VERSION="${{ steps.set-version.outputs.version }}"
CHANGELOG=$(cat ".github/release/v${SPEC_VERSION}.md")
{
echo 'changelog<<EOF'
echo "$CHANGELOG"
echo 'EOF'
} >> $GITHUB_OUTPUT
- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create ${{ steps.set-version.outputs.version }} \
--title "${{ steps.set-version.outputs.version }}" \
--notes "${{ steps.changelog.outputs.changelog }}" \
--latest
- name: Publish artifacts
id: goreleaser-publish
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: "latest"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}