-
Notifications
You must be signed in to change notification settings - Fork 13
58 lines (53 loc) · 1.54 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
name: Release
on:
push:
tags: [ v* ]
env:
CARGO_TERM_COLOR: always
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: taiki-e/create-gh-release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
upload:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: taiki-e/upload-rust-binary-action@v1
with:
bin: diode-send,diode-receive,diode-send-file,diode-receive-file
archive: lidi-$tag
token: ${{ secrets.GITHUB_TOKEN }}
build-and-push-docker-image:
name: Builds and pushes a tagged docker image
runs-on: ubuntu-latest
strategy:
matrix:
lidi_service:
- send
- receive
steps:
- uses: actions/checkout@v4
- uses: docker/login-action@v3
with:
registry: docker.io
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: docker/metadata-action@v5
id: docker_meta
with:
images: docker.io/anssi/lidi-${{ matrix.lidi_service }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- uses: docker/build-push-action@v5
with:
context: .
push: true
target: ${{ matrix.lidi_service }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}