-
Notifications
You must be signed in to change notification settings - Fork 5
62 lines (57 loc) · 1.54 KB
/
build_and_test_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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Build Test Release
on:
push:
branches: [ main, next ]
pull_request:
branches: [ main, next ]
jobs:
build_test_common_os:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
toolchain: [stable]
steps:
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
override: true
- uses: extractions/setup-just@v2
- uses: hustcer/setup-nu@v3.9
with:
version: '0.85'
- name: Just version
run: just --version
- name: Build
run: just build_all
- name: Test
run: just test_all
release:
name: Release
runs-on: ubuntu-latest
needs: [build_test_common_os]
if: github.ref == 'refs/heads/main'
permissions:
contents: write
packages: write
steps:
- name: Checkout code
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4
with:
ref: main
- name: install npm
uses: actions/setup-node@v4
with:
node-version: '16'
- name: install @semantic-release/exec
run: npm install @semantic-release/exec
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v3
with:
branch: main
env:
GITHUB_TOKEN: ${{ secrets.PAT_GLOBAL }}
CARGO_TOKEN: ${{ secrets.CARGO_TOKEN }}