Repository navigation
85 lines (79 loc) · 2.34 KB
/
Copy pathrelease.yml
File metadata and controls
85 lines (79 loc) · 2.34 KB
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
75
76
77
78
79
80
81
82
83
84
85
name: Release
on:
workflow_dispatch:
inputs:
version_bump:
description: Version bump type
required: true
type: choice
options:
- patch
- minor
- major
permissions:
contents: read
concurrency: release
jobs:
version:
name: Write the next version into the five backends
runs-on: ubuntu-latest
timeout-minutes: 30
outputs:
version: ${{ steps.next.outputs.version }}
steps:
- uses: actions/checkout@v7.0.1
- uses: cachix/install-nix-action@v32.0.0
- id: next
run: echo "version=$(maint/next-version.sh "$BUMP")" >> "$GITHUB_OUTPUT"
env:
BUMP: ${{ inputs.version_bump }}
- run: maint/set-version.sh "$VERSION"
env:
VERSION: ${{ steps.next.outputs.version }}
- run: git diff --binary > version.patch
- uses: actions/upload-artifact@v7.0.2
with:
name: version-patch
path: version.patch
check:
name: make check (${{ matrix.dir }})
needs: version
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
matrix:
dir: [Rust, Python, TypeScript, Clojure, PHP]
steps:
- uses: actions/checkout@v7.0.1
- uses: cachix/install-nix-action@v32.0.0
- uses: actions/download-artifact@v8.0.2
with:
name: version-patch
- run: git apply version.patch && rm version.patch
- run: make check BACKENDS=${{ matrix.dir }}
tag:
name: Commit, tag and start the publish
needs: [version, check]
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: write
actions: write
steps:
- uses: actions/checkout@v7.0.1
- uses: actions/download-artifact@v8.0.2
with:
name: version-patch
- run: git apply version.patch && rm version.patch
- run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git commit -am "release v$VERSION"
maint/push-release.sh
env:
VERSION: ${{ needs.version.outputs.version }}
BRANCH: ${{ github.ref_name }}
- run: gh workflow run publish.yml -f tag="v$VERSION"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ needs.version.outputs.version }}