-
-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (74 loc) · 2.84 KB
/
release.yml
File metadata and controls
85 lines (74 loc) · 2.84 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
name: Release
on:
workflow_dispatch:
inputs:
run_id:
description: 'ID of the CI workflow run that created the release assets'
type: number
required: true
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true
permissions: {}
jobs:
release-drafter:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: read
steps:
- uses: release-drafter/release-drafter@563bf132657a13ded0b01fcb723c5a58cdd824e2 # v7.2.1
with:
tag: ${{ github.ref_name }}
goreleaser:
runs-on: ubuntu-latest
needs: release-drafter
permissions:
# For $ gh run download
actions: read
# For GoReleaser
contents: write
# For actions/attest
id-token: write
attestations: write
artifact-metadata: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: stable
- run: gh run download "${RUN_ID}" --dir out --pattern 'php-matrix_*'
env:
RUN_ID: ${{ inputs.run_id }}
GH_TOKEN: ${{ github.token }}
- uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1
id: app-token
with:
client-id: ${{ vars.TASTENDRUCK_CLIENT_ID }}
private-key: ${{ secrets.TASTENDRUCK_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
repositories: homebrew-tap
permission-contents: write
- uses: goreleaser/goreleaser-action@1a80836c5c9d9e5755a25cb59ec6f45a3b5f41a8 # v7.2.1
with:
version: "~> v2"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_HOMEBREW_GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
- uses: actions/attest@59d89421af93a897026c735860bf21b6eb4f7b26 # v4.1.0
with:
subject-checksums: ./dist/checksums.txt
- uses: cloudsmith-io/cloudsmith-cli-action@18665afcce9f859312b61989671af9af7402e4fb # v2.0.2
with:
api-key: ${{ secrets.CLOUDSMITH_API_KEY_TASTENDRUCK }}
- run: echo "VERSION=${TAG#v}" >> "$GITHUB_ENV"
env:
TAG: ${{ github.ref_name }}
- run: cloudsmith push deb typisttech/oss/any-distro/any-version "dist/php-matrix_${VERSION}_linux_arm64.deb"
- run: cloudsmith push deb typisttech/oss/any-distro/any-version "dist/php-matrix_${VERSION}_linux_amd64.deb"
- run: cloudsmith push alpine typisttech/oss/alpine/any-version "dist/php-matrix_${VERSION}_linux_arm64.apk"
- run: cloudsmith push alpine typisttech/oss/alpine/any-version "dist/php-matrix_${VERSION}_linux_amd64.apk"