-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (47 loc) · 1.66 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
46
47
48
49
50
51
name: provwasm-test-tube release
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+" # Push events to matching v*, i.e. v1.0, v20.15.10
- "v[0-9]+.[0-9]+.[0-9]+-rc*" # Push events to matching v*, i.e. v1.0-rc1, v20.15.10-rc5
- "v[0-9]+.[0-9]+.[0-9]+-beta*" # Push events to matching v*, i.e. v1.0.0-beta2
jobs:
# This action cleans up previously running instances of a workflow on the same branch. This accomplishes
# the task of automatically cancelling CI runs on pushes to the same branch, which is a common feature in
# most CI systems but currently not possible with GitHub actions.
cleanup_runs:
name: Cleanup Workflows
runs-on: ubuntu-latest
steps:
- uses: rokroskar/[email protected]
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main'"
build_test:
name: Build and Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up cargo cache
uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
create_release:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create release
uses: softprops/action-gh-release@v2
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: ${{ github.ref_name }}
draft: true
prerelease: false
body_path: RELEASE_CHANGELOG.md
token: ${{ secrets.GITHUB_TOKEN }}