Skip to content

Commit b098041

Browse files
committed
ci: automate the release process
1 parent b06f9fb commit b098041

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/release.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Release
2+
3+
on:
4+
# TODO: Remove this after testing
5+
push:
6+
workflow_dispatch:
7+
inputs:
8+
dry_run:
9+
description: 'Dry run'
10+
required: true
11+
default: true
12+
type: boolean
13+
level:
14+
description: 'Release level'
15+
required: true
16+
default: 'patch'
17+
type: choice
18+
options:
19+
- patch
20+
- minor
21+
- major
22+
23+
jobs:
24+
release:
25+
runs-on: ubuntu-latest
26+
# The permissions should allow the user to:
27+
# 1. Push to the branch of the repository that triggered the workflow.
28+
# 2. Create a tag.
29+
# 3. Push to crates.io.
30+
permissions:
31+
contents: write
32+
steps:
33+
- uses: actions/checkout@v4
34+
- name: Install required packages
35+
run: sudo apt install --no-install-recommends --yes libhwloc-dev nvidia-cuda-toolkit ocl-icd-opencl-dev
36+
- name: Install cargo release
37+
run: cargo install --version 0.25.17 cargo-release
38+
- name: Run cargo release
39+
# TODO: Uncomment this after testing
40+
# run: cargo release ${{ (!github.event.inputs.dry_run) && '--execute' || '' }} --no-confirm ${{ github.event.inputs.level }}
41+
# TODO: Remove this after testing
42+
run: cargo release patch

0 commit comments

Comments
 (0)