-
Notifications
You must be signed in to change notification settings - Fork 1
94 lines (89 loc) · 2.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
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
86
87
88
89
90
91
92
93
94
name: Release
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+
jobs:
get-version:
runs-on: ubuntu-24.04
outputs:
version: ${{ steps.get-version.outputs.version }}
steps:
- uses: actions/checkout@v4
- name: Install Rust
run: ./ci/install-rust.sh stable --profile minimal
- id: get-version
run: ./ci/get-release-version.sh
get-ci-artifacts:
runs-on: ubuntu-24.04
steps:
- name: Download artifacts
uses: dawidd6/action-download-artifact@09f2f74827fd3a8607589e5ad7f9398816f540fe
with:
workflow: ci.yml
workflow_conclusion: success
commit: ${{ github.sha }}
event: push
- name: Upload version-changelog artifact
uses: actions/upload-artifact@v4
with:
name: version-changelog
path: version-changelog/*
if-no-files-found: error
- name: Upload dist-linux artifact
uses: actions/upload-artifact@v4
with:
name: dist-linux
path: dist-linux/*
if-no-files-found: error
- name: Upload dist-windows artifact
uses: actions/upload-artifact@v4
with:
name: dist-windows
path: dist-windows/*
if-no-files-found: error
create-gh-release:
needs:
- get-version
- get-ci-artifacts
permissions:
contents: write
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Download version-changelog artifact
uses: actions/download-artifact@v4
with:
name: version-changelog
- name: Download dist-linux artifact
uses: actions/download-artifact@v4
with:
name: dist-linux
- name: Download dist-windows artifact
uses: actions/download-artifact@v4
with:
name: dist-windows
- name: Create GitHub release
env:
GH_TOKEN: ${{ github.token }}
RELEASE_VERSION: ${{ needs.get-version.outputs.version }}
run: |
gh release create "${GITHUB_REF#refs/tags/}" \
"rsjsonnet-linux-x86_64.tar.gz" \
"rsjsonnet-linux-i686.tar.gz" \
"rsjsonnet-windows-x86_64.zip" \
"rsjsonnet-windows-i686.zip" \
--verify-tag \
--title "$RELEASE_VERSION" \
--notes-file version-changelog
publish-crates:
needs: create-gh-release
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Install Rust
run: ./ci/install-rust.sh stable --profile minimal
- name: Publish
env:
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
run: ./ci/publish-crates.sh