-
-
Notifications
You must be signed in to change notification settings - Fork 563
54 lines (48 loc) · 1.67 KB
/
release-publish-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
name: Crates IO Publish
on:
workflow_dispatch:
inputs:
ockam_publish_exclude_crates:
description: Exclude Specific Crates From Being Published
required: false
release_git_tag:
description: Latest Release Git Tag
required: true
ockam_publish_recent_failure:
description: Indicate A Recent Failure
type: choice
default: 'false'
options:
- false
- true
permissions:
# Contents permission allows us read this repository.
contents: read
defaults:
run:
shell: bash
jobs:
publish_crates:
runs-on: ubuntu-20.04
container:
# Note: Do not update this image has it has installed all binaries
# to bump crates and generate changelogs which we don't want installed
# in our CI packages.
image: ghcr.io/build-trust/ockam-builder@sha256:a04b6a0aa01a93ba9a5c67392872893b261772dedfcd58f72a1addacf7535c09
environment: release
name: "Publish Crates To Crates IO"
steps:
- name: Checkout Ockam
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
with:
fetch-depth: 0
ref: ${{ github.event.inputs.release_git_tag }}
- name: Create A Temporary Branch To Perform Release
run: git checkout -B "$(date +%s)"
- name: Publish Ockam Crates
env:
OCKAM_PUBLISH_TOKEN: '${{ secrets.CRATES_IO_PUBLISH_TOKEN }}'
OCKAM_PUBLISH_RECENT_FAILURE: '${{ github.event.inputs.ockam_publish_recent_failure }}'
OCKAM_PUBLISH_EXCLUDE_CRATES: '${{ github.event.inputs.ockam_publish_exclude_crates }}'
run: |
bash -ex ./tools/scripts/release/crate-publish.sh