-
Notifications
You must be signed in to change notification settings - Fork 4
54 lines (52 loc) · 1.84 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: goreleaser
on:
create:
tags:
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Fetch tags
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Ensure tag match the current version
run: |
if [ "v$(grep '// ci-version-check' cmd/version.go | sed -r 's/.+return\s"(.+)".+/\1/')" != "$(git tag | sort --version-sort | tail -1)" ] ; then
echo "Tag version do not match application version"
exit 1
fi
- name: Set up Go
uses: actions/setup-go@main
with:
go-version: 1.22.x
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: latest
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v1
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GORELEASER_QOVERY_TOKEN }}
- name: Prepare AUR package
run: |
version=$(awk -F'"' '/ci-version-check/{print $2}' cmd/version.go)
md5version=$(curl -sL https://github.com/Qovery/helm-freeze/archive/v${version}.tar.gz --output - | md5sum | awk '{ print $1 }')
sed -i "s/pkgver=tbd/pkgver=$version/" PKGBUILD
echo "md5sums=('${md5version}')" >> PKGBUILD
- name: Publish AUR package
uses: KSXGitHub/[email protected]
with:
pkgname: helm-freeze
pkgbuild: ./PKGBUILD
commit_username: ${{ secrets.AUR_USERNAME }}
commit_email: ${{ secrets.AUR_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
commit_message: Update AUR package
ssh_keyscan_types: rsa,dsa,ecdsa,ed25519
force_push: "true"