-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (62 loc) · 1.93 KB
/
release.yaml
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
---
name: Release
permissions:
actions: none
checks: none
contents: write
deployments: none
issues: none
packages: none
pages: none
pull-requests: none
repository-projects: none
security-events: none
on:
release:
types:
- released
env:
SCRIPTS_NO_INTERACTIVE: "true"
defaults:
run:
shell: bash
jobs:
tag:
name: Release
runs-on: ubuntu-latest
env:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Golang
uses: actions/setup-go@v5
with:
go-version: "^1.22"
cache: true
- name: Build
run: make init
- name: GPG
id: import_gpg
if: ${{ env.gpg_private_key != '' }}
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ env.gpg_private_key }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
- name: Assets
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
GO_ARCHS: linux/amd64 linux/arm linux/arm64 darwin/amd64 darwin/arm64
run: |
curl --disable --silent --show-error --location --max-time 30 "https://raw.githubusercontent.com/ViBiOh/scripts/main/bootstrap.sh" | bash -s -- "-c" "release.sh"
export GIT_TAG="$(basename ${{ github.ref }})"
scripts/release.sh build assets clean
- name: Docker
if: ${{ env.docker_user != '' }}
env:
DOCKER_USER: ${{ env.docker_user }}
DOCKER_PASS: ${{ secrets.DOCKER_PASS }}
run: |
curl --disable --silent --show-error --location --max-time 30 "https://raw.githubusercontent.com/ViBiOh/scripts/main/bootstrap.sh" | bash -s -- "-c" "docker_promote.sh"
scripts/docker_promote.sh "${{ env.DOCKER_USER }}/$(make name)" "$(make version-date)" "$(basename ${{ github.ref }})"