forked from gleam-lang/gleam
-
Notifications
You must be signed in to change notification settings - Fork 0
99 lines (88 loc) · 2.82 KB
/
Copy pathrelease.yaml
File metadata and controls
99 lines (88 loc) · 2.82 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
name: release
on:
push:
tags:
- "v*"
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-D warnings"
permissions:
contents: read
jobs:
build-release:
name: build-release
runs-on: ${{ matrix.os }}
environment: release
permissions:
id-token: write
attestations: write
strategy:
matrix:
target:
- x86_64-unknown-linux-musl
- aarch64-unknown-linux-musl
- armv7-unknown-linux-gnueabihf
toolchain: [ stable ]
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-musl
expected-binary-architecture: x86-64
cargo-tool: cross
- os: ubuntu-latest
target: aarch64-unknown-linux-musl
expected-binary-architecture: aarch64
cargo-tool: cross
- os: ubuntu-latest
target: armv7-unknown-linux-gnueabihf
expected-binary-architecture: armhf
cargo-tool: cross
- os: ubuntu-latest
target: wasm32-unknown-unknown
cargo-tool: wasm-pack
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: "Build Archive"
id: build
uses: "./.github/actions/build-release"
with:
version: ${{ github.ref_name }}
toolchain: ${{ matrix.toolchain }}
target: ${{ matrix.target }}
cargo-tool: ${{ matrix.cargo-tool }}
expected-binary-architecture: ${{ matrix.expected-binary-architecture }}
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
azure-subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
azure-trusted-signing-account-name: ${{ vars.AZURE_TRUSTED_SIGNING_ACCOUNT_NAME }}
azure-certificate-profile-name: ${{ vars.AZURE_CERTIFICATE_PROFILE_NAME }}
create-release:
name: create-release
needs: ['build-release']
runs-on: ubuntu-latest
environment: release
permissions:
contents: write
steps:
- name: Download Artifacts
uses: actions/download-artifact@v6
with:
pattern: release-*
merge-multiple: true
- name: Create release
env:
GITHUB_TOKEN: '${{ github.token }}'
REPOSITORY: '${{ github.repository }}'
TITLE: '${{ github.ref_name }}'
TAG_NAME: '${{ github.ref_name }}'
NOTES: '${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/CHANGELOG.md'
run: |
gh release create \
--repo "$REPOSITORY" \
--title "$TITLE" \
--notes "$NOTES" \
--draft \
--verify-tag \
${{ contains(github.ref_name, '-rc') && '--prerelease' || '' }} \
"$TAG_NAME" \
gleam-*