-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (46 loc) · 1.27 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
name: Release
on:
push:
tags:
- 'v*.*.*'
jobs:
goreleaser:
name: Release new version
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Unshallow
run: git fetch --prune --unshallow
- name: Setup Go
uses: actions/setup-go@v1
with:
go-version: 1.18.x
- name: GoReleaser
uses: goreleaser/goreleaser-action@v1
with:
version: latest
args: release --rm-dist
key: ${{ secrets.YOUR_PRIVATE_KEY }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
push_to_registry:
name: Push Docker image to GitHub Packages
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Prepare tags
id: prep
run: |
VERSION=${GITHUB_REF#refs/tags/}
TAGS="${VERSION},latest"
echo ::set-output name=tags::${TAGS}
- name: Push to GitHub Packages
uses: docker/build-push-action@v1
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: docker.pkg.github.com
repository: utkuufuk/entrello/image
tags: ${{ steps.prep.outputs.tags }}