-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (39 loc) · 1.17 KB
/
continuous-delivery.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
name: Continuous Delivery (CD)
on:
release:
types: [published]
# https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
permissions:
contents: write
env:
# Forcing Earthly to use colours, to make reading output easier.
FORCE_COLOR: 1
jobs:
publish-binary:
name: Publish Binary
runs-on: ubuntu-latest
steps:
- name: Download Earthly.
uses: earthly/actions-setup@v1
with:
version: v0.8.15
- name: Checkout code.
uses: actions/checkout@v4
- name: Publish binary.
run: earthly --ci --secret GH_TOKEN +publish-binary --release "${GITHUB_REF_NAME}"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by GitHub Actions.
publish-crate:
name: Publish Crate
runs-on: ubuntu-latest
steps:
- name: Download Earthly.
uses: earthly/actions-setup@v1
with:
version: v0.8.15
- name: Checkout code.
uses: actions/checkout@v4
- name: Publish crate.
run: earthly --ci --secret CARGO_REGISTRY_TOKEN +publish-crate
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}