-
Notifications
You must be signed in to change notification settings - Fork 373
74 lines (61 loc) · 2.11 KB
/
auto_release_crates.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
63
64
65
66
67
68
69
70
71
72
73
74
name: Automated crates release
on:
workflow_dispatch:
schedule:
- cron: "0 14 * * MON"
push:
branches: [main]
permissions:
contents: write
id-token: "write"
jobs:
create-release:
name: "Create Release"
runs-on: ubuntu-latest
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: prefix-dev/setup-pixi@v0.4.1
with:
pixi-version: v0.13.0
- name: Install dependencies
shell: bash
run: |
python3 -m pip install -r scripts/ci/requirements-crates.txt
- name: Update crate versions
shell: bash
run: |
python3 scripts/ci/crates.py version --bump prerelease
- run: pixi run toml-fmt
shell: bash
- name: Get bumped version
id: versioning
shell: bash
run: |
crate_version=$(python3 scripts/ci/crates.py get-version)
echo "crate_version=$crate_version" >> "$GITHUB_OUTPUT"
- name: Create pull request
uses: peter-evans/create-pull-request@v5.0.2
with:
token: ${{ secrets.RERUN_BOT_TOKEN }}
branch: "weekly-release-${{ steps.versioning.outputs.crate_version }}"
commit-message: "[weekly-release] ${{ steps.versioning.outputs.crate_version }}"
title: "Release ${{ steps.versioning.outputs.crate_version }}"
labels: |
⛴ release
exclude from changelog
committer: "Rerun Bot <bot@rerun.io>"
author: "Rerun Bot <bot@rerun.io>"
body: |
### What
- [x] Bump all crate versions to `${{ steps.versioning.outputs.crate_version }}`
The release process will begin once this pull request is merged.
<!-- [weekly-release] -->
publish-crates:
name: "Publish Crates"
if: github.event_name == 'push' && contains(github.event.head_commit.message, '[weekly-release]')
uses: ./.github/workflows/reusable_release_crates.yml
with:
CONCURRENCY: weekly-release-${{ github.run_id }}
secrets: inherit