Repository navigation
104 lines (93 loc) · 2.97 KB
/
Copy pathrelease-github.yml
File metadata and controls
104 lines (93 loc) · 2.97 KB
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: Make GitHub Draft / Docker image
on:
push:
tags:
- v*
permissions:
contents: read
jobs:
check:
uses: $/.github/workflows/checks.yml
build:
uses: $/.github/workflows/build.yml
meta:
name: Check Version
runs-on: ubuntu-latest
outputs:
pre_release: ${{ steps.pre-release.outputs.pre_release }}
needs:
- check
- build
permissions:
contents: read
steps:
- name: Check pre-release
id: pre-release
run: |
if [[ "${GITHUB_REF_NAME}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "pre_release=false" >> $GITHUB_OUTPUT
else
echo "pre_release=true" >> $GITHUB_OUTPUT
fi
github-release:
name: Create A GitHub Release
runs-on: ubuntu-latest
needs: ["meta"]
permissions:
contents: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- name: Generate release notes
uses: orhun/git-cliff-action@a9a95522b26fe6403f7bb24031f21fb573d0f5ff # v4.9.1
with:
config: cliff.toml
args: --verbose --latest
env:
OUTPUT: release.md
GITHUB_REPO: ${{ github.repository }}
- name: Download All Artifacts
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
path: artifacts
pattern: rustowl-*
merge-multiple: true
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Release
uses: softprops/action-gh-release@efb35369e0ad2afab669f228072c1b0d510eae64 # v3.0.3
with:
files: artifacts/**/*
draft: true
body_path: release.md
prerelease: ${{ needs.meta.outputs.pre_release == 'true' }}
docker-release:
name: Release To GitHub Container Registry
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Login to GitHub Container Registry
uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4.7.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@99012661954931238ded8c8b007157a8430204e1 # v4.4.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1
- name: Build and push Docker image
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
with:
context: .
push: true
tags: |
ghcr.io/${{ github.repository }}:latest
ghcr.io/${{ github.repository }}:${{ github.ref_name }}