-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (42 loc) · 1.22 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
name: release
on:
# push:
# tags:
# - 'v*'
create:
tags:
- 'v*'
permissions:
contents: write
id-token: write # needed for signing the images with GitHub OIDC Token
jobs:
releaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Add WASM target
run: rustup target add wasm32-wasi
- name: Install Cosign
uses: sigstore/cosign-installer@main
- name: Build
run: cargo build --release
- name: Sign binary
run: cosign sign-blob --oidc-issuer=https://token.actions.githubusercontent.com --output-certificate=cosign_cert.pem --output-signature=cosign.sig target/wasm32-wasi/release/ghost.wasm
env:
## Cosign ENV Vars
COSIGN_EXPERIMENTAL: 1
COSIGN_YES: true
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
target/wasm32-wasi/release/ghost.wasm
cosign.sig
cosign_cert.pem