-
Notifications
You must be signed in to change notification settings - Fork 5
75 lines (66 loc) · 2.23 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
name: 🚀 Release Packages & Binaries
on:
push:
branches: [ main ]
workflow_dispatch:
inputs:
run_publish_release:
description: 'Publish release'
type: boolean
required: true
default: false
permissions:
contents: write
pull-requests: write
jobs:
release-please:
runs-on: ubuntu-latest
outputs:
releases_created: ${{ steps.release.outputs.releases_created }}
prs_created: ${{ steps.release.outputs.prs_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
steps:
- name: Setup release-please
uses: googleapis/release-please-action@v4
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
- name: Check release status
run: |
echo "Release created: ${{ steps.release.outputs.releases_created }}"
echo "PRs created: ${{ steps.release.outputs.prs_created }}"
echo "monocore created: ${{ steps.release.outputs.monocore--releases_created }}"
echo "monofs created: ${{ steps.release.outputs.monofs--releases_created }}"
echo "monoutils-store created: ${{ steps.release.outputs.monoutils-store--releases_created }}"
publish-release:
needs:
- release-please
if: ${{ needs.release-please.outputs.releases_created == 'true' || github.event.inputs.run_publish_release }}
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Publish monoutils-store
working-directory: monoutils-store
env:
CARGO_TOKEN: ${{ secrets.CARGO_TOKEN }}
run: |
cargo publish -p monoutils-store
- name: Wait for crates.io index update
run: |
echo "Waiting for crates.io to update index..."
sleep 30
- name: Publish monofs
working-directory: monofs
env:
CARGO_TOKEN: ${{ secrets.CARGO_TOKEN }}
run: |
cargo publish -p monofs
- name: Publish monocore
working-directory: monocore
env:
CARGO_TOKEN: ${{ secrets.CARGO_TOKEN }}
run: |
cargo publish -p monocore