-
Notifications
You must be signed in to change notification settings - Fork 136
80 lines (67 loc) · 2.41 KB
/
release-rc.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Release Armada components - RC
on:
push:
branches:
- main
- master
permissions:
contents: write
jobs:
release:
if: github.repository_owner == 'armadaproject'
name: Release
runs-on: "ubuntu-22.04"
environment: armada-dockerhub
steps:
- name: "Checkout"
uses: "actions/checkout@v3"
with:
fetch-depth: 0
- name: Setup Golang with Cache
uses: magnetikonline/action-golang-cache@v4
with:
go-version: "1.20"
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: "Docker login"
uses: "docker/login-action@v2"
with:
username: "${{ secrets.DOCKERHUB_USER }}"
password: "${{ secrets.DOCKERHUB_PASS }}"
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0
with:
versionSpec: "6.x"
includePrerelease: true
- name: Determine Version
id: gitversion
uses: gittools/actions/gitversion/execute@v0
- name: Display GitVersion outputs (step output)
run: |
echo "Major: ${{ steps.gitversion.outputs.major }}"
echo "Minor: ${{ steps.gitversion.outputs.minor }}"
echo "Patch: ${{ steps.gitversion.outputs.patch }}"
echo "Sha: ${{ steps.gitversion.outputs.sha }}"
echo "ShortSha: ${{ steps.gitversion.outputs.shortSha }}"
- name: Set next RC version
id: "set_next_version"
run: echo "next_version=${{ steps.gitversion.outputs.majorMinorPatch }}-rc-${{ steps.gitversion.outputs.shortSha }}" >> $GITHUB_OUTPUT
- uses: rickstaa/action-create-tag@v1
id: "tag_create"
with:
tag: "v${{ steps.set_next_version.outputs.next_version }}"
force_push_tag: true
message: "Armada Release Candidate for version v${{ steps.gitversion.outputs.majorMinorPatch }}"
- name: "Run GoReleaser"
uses: "goreleaser/goreleaser-action@v4"
with:
distribution: "goreleaser"
version: v1.18.2
args: "-f ./.goreleaser.yml release --skip-sbom --skip-sign --clean"
env:
DOCKER_REPO: "gresearch"
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
DOCKER_BUILDX_BUILDER: "${{ steps.buildx.outputs.name }}"
DOCKER_BUILDX_CACHE_FROM: "type=gha"
DOCKER_BUILDX_CACHE_TO: "type=gha,mode=max"