-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (70 loc) · 2.12 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
76
77
78
79
80
name: release
on:
workflow_dispatch:
push:
tags: ["*"]
env:
ECR_REPO: public.ecr.aws/altlayer/subway
GHCR_REPO: ghcr.io/${{ github.repository_owner }}/subway
jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: login to ecr
uses: docker/login-action@v3
with:
registry: public.ecr.aws
username: ${{ secrets.ECR_ACCESS_KEY_ID }}
password: ${{ secrets.ECR_ACCESS_KEY }}
- name: login to ghcr
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: |
${{ env.GHCR_REPO }}
${{ env.ECR_REPO }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=ref,event=tag
type=sha
type=sha,format=long
type=raw,value=latest,enable={{is_default_branch}}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
make-release:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: build changelog
id: changelog
uses: mikepenz/release-changelog-builder-action@v4
with:
configuration: .github/changelog-builder.json
ignorePreReleases: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: make release
uses: ncipollo/release-action@v1
if: startsWith(github.ref, 'refs/tags/')
with:
body: |
${{ steps.changelog.outputs.changelog }}
allowUpdates: true
prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') || contains(github.ref, 'rc') || contains(github.ref, 'pre') }}
draft: true