-
Notifications
You must be signed in to change notification settings - Fork 0
105 lines (91 loc) · 3.18 KB
/
Copy pathrelease.yml
File metadata and controls
105 lines (91 loc) · 3.18 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: Release
on:
push:
tags:
- "*.*"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build
runs-on: firecracker
permissions:
contents: write
packages: write
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
fetch-depth: 0
- name: Set up Go 1.25
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0
with:
go-version: '1.25'
id: go
- name: Prepare git
env:
GITHUB_USER: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -x
git config --global user.name "${GITHUB_USER}"
git config --global user.email "${GITHUB_USER}@appscode.com"
git config --global \
url."https://${GITHUB_USER}:${GITHUB_TOKEN}@github.com".insteadOf \
"https://github.com"
- name: Prepare Host
run: |
sudo apt-get -qq update || true
sudo apt-get install -y zip
- name: Print version info
id: semver
run: |
make version
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
with:
cache-image: false
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
- uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3
id: app-token
with:
client-id: ${{ secrets.GHCRX_APP_CLIENT_ID }}
private-key: ${{ secrets.GHCRX_APP_PRIVATE_KEY }}
owner: appscode
- name: Login to GitHub Container Registry
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
with:
registry: ghcr.io
username: ${{ steps.app-token.outputs.app-slug }}[bot]
password: ${{ steps.app-token.outputs.token }}
- name: Publish to GitHub Container Registry
env:
REGISTRY: ghcr.io/appscode
APPSCODE_ENV: prod
run: |
make release COMPRESS=yes
# - name: Publish to Red Hat Ecosystem Catalog
# env:
# REGISTRY: ghcr.io/appscode
# PFLT_PYXIS_API_TOKEN: ${{ secrets.PFLT_PYXIS_API_TOKEN }}
# run: |
# curl -fsSL -o preflight https://github.com/redhat-openshift-ecosystem/openshift-preflight/releases/latest/download/preflight-linux-amd64
# chmod +x preflight
# sudo mv preflight /usr/local/bin/preflight
# make docker-certify-redhat
- name: Release
uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2.6.2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
bin/ace-darwin-amd64.tar.gz
bin/ace-darwin-arm64.tar.gz
bin/ace-linux-amd64.tar.gz
bin/ace-linux-arm64.tar.gz
bin/ace-windows-amd64.zip
bin/ace-checksums.txt
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}