-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (41 loc) · 1.37 KB
/
release.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
name: Rust CI
on:
push:
branches:
- main
jobs:
build:
permissions: write-all
runs-on: ubuntu-latest
strategy:
matrix:
project:
- name: wit2wadm
project-dir: ./wash-plugin
artifact: wit2wadm_plugin_s.wasm
subject-key: WASH_PLUGIN_SUBJECT_KEY
steps:
- uses: actions/checkout@v2
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: wasmCloud/common-actions/install-wash@main
- name: Install wasm32-wasi
run: rustup target add wasm32-wasi
- name: Build
env:
WASH_ISSUER_KEY: ${{ secrets.WASH_ISSUER_KEY }}
run: |
cd ${{ matrix.project.project-dir }}
export WASH_SUBJECT_KEY=${{ secrets[matrix.project.subject-key] }}
wash build
- name: Push
env:
WASH_REG_USER: brooksmtownsend
WASH_REG_PASSWORD: ${{ github.token }}
run: |
version=$(cargo metadata --no-deps |jq -r '.packages[0].version')
wash push ghcr.io/brooksmtownsend/${{ matrix.project.name }}:canary ${{ matrix.project.project-dir }}/build/${{ matrix.project.artifact }}
wash push ghcr.io/brooksmtownsend/${{ matrix.project.name }}:$version ${{ matrix.project.project-dir }}/build/${{ matrix.project.artifact }}