forked from pkolaczk/latte
-
Notifications
You must be signed in to change notification settings - Fork 2
68 lines (62 loc) · 1.72 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
name: 'Release'
on:
push:
tags:
- '*'
jobs:
get_tag:
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.version_tag.outputs.tag }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Get Tag
uses: olegtarasov/[email protected]
id: version_tag
with:
tagRegex: "(.*)"
docker_build:
uses: ./.github/workflows/docker.yml
needs: [get_tag]
with:
version: ${{ needs.get_tag.outputs.tag }}
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
release:
needs: [get_tag, docker_build]
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-24.04]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --release
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ needs.get_tag.outputs.tag }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset-unix
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./target/release/latte
asset_name: latte-${{ matrix.os }}
asset_content_type: application/octet-stream