-
Notifications
You must be signed in to change notification settings - Fork 1
66 lines (60 loc) · 1.9 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
name: Release
on:
workflow_dispatch:
inputs:
dry-run:
description: Perform a dry-run of the release, without any side-effects
type: boolean
required: true
version:
description: >
Release version. Can be left unspecified if `dry-run = true`,
in which case the workflow will generate it using `git describe`
type: string
required: false
env:
ACTOR_NAME: zettascale-bot
ACTOR_EMAIL: [email protected]
jobs:
ci:
uses: ./.github/workflows/ci.yml
tag:
runs-on: [self-hosted, ubuntu-20.04]
needs: ci
outputs:
branch: ${{ steps.tag.outputs.branch }}
version: ${{ steps.tag.outputs.version }}
steps:
- id: tag
uses: ZettaScaleLabs/ci/tag-crates@develop
with:
repo: ${{ github.repository }}
dry-run: ${{ inputs.dry-run }}
github-token: ${{ secrets.ZETTASCALE_BOT_PERSONAL_ACCESS_TOKEN }}
actor-name: ${{ env.ACTOR_NAME }}
actor-email: ${{ env.ACTOR_EMAIL }}
inter-deps-pattern: ^$
publish-cargo:
runs-on: [self-hosted, ubuntu-20.04]
needs: tag
steps:
- uses: ZettaScaleLabs/ci/publish-crates-cargo@develop
with:
repos: ${{ github.repository }}
branch: ${{ needs.tag.outputs.branch }}
dry-run: ${{ inputs.dry-run }}
github-token: ${{ secrets.ZETTASCALE_BOT_PERSONAL_ACCESS_TOKEN }}
crates-io-token: ${{ secrets.ZETTASCALE_CRATES_IO_TOKEN }}
inter-deps-pattern: ^$
publish-github:
runs-on: [self-hosted, ubuntu-20.04]
needs: tag
steps:
- if: ${{ !inputs.dry-run }}
run: >
gh release create ${{ needs.tag.outputs.version }}
--target ${{ needs.tag.outputs.branch }}
--latest
--generate-notes
env:
GH_TOKEN: ${{ secrets.ZETTASCALE_BOT_PERSONAL_ACCESS_TOKEN }}