-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (69 loc) · 2.35 KB
/
Copy pathrelease.yaml
File metadata and controls
77 lines (69 loc) · 2.35 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
77
name: Release
on:
workflow_dispatch:
push:
branches:
- 'main'
jobs:
tests:
uses: coolapso/convcommitlint/.github/workflows/test.yaml@main
release:
needs: tests
runs-on: ubuntu-latest
concurrency:
group: semrel-release-${{ github.repository }}-${{ github.ref }}
cancel-in-progress: false
permissions:
contents: write
packages: write
outputs:
version: ${{ steps.semrel.outputs.version }}
released: ${{ steps.semrel.outputs.released }}
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- uses: actions/setup-go@v6
with:
go-version: '1.27.x'
- name: Configure Git identity
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Install semrel
run: |
go install github.com/SemRels/semrel/cmd/semrel@v0.26.2
echo "$(go env GOPATH)/bin" >> "$GITHUB_PATH"
semrel plugin restore
- name: Release with semrel
id: semrel
run: semrel release --github-output
env:
SEMREL_PLUGIN_TOKEN: ${{ github.token }}
# Semrel creates the tag and GitHub release. GoReleaser then attaches the
# compiled assets and retains the existing release notes while publishing
# the AUR package and Discord announcement.
- name: Publish release artifacts
if: ${{ steps.semrel.outputs.released == 'true' }}
uses: goreleaser/goreleaser-action@v7
with:
version: '~> v2'
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AUR_KEY: ${{ secrets.AUR_KEY }}
DISCORD_WEBHOOK_ID: ${{ secrets.DISCORD_WEBHOOK_ID }}
DISCORD_WEBHOOK_TOKEN: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
- name: Update Docker Hub Description
uses: peter-evans/dockerhub-description@v5
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: coolapso/convcommitlint
docker:
needs: release
uses: coolapso/convcommitlint/.github/workflows/docker.yaml@main
if: ${{ needs.release.outputs.released == 'true' }}
secrets: inherit
with:
release_tag: ${{ needs.release.outputs.version }}