forked from mxpv/podsync
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (42 loc) · 1.18 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
name: Release
on:
push:
tags:
- 'v*'
schedule:
- cron: "0 0 * * *" # Every day at midnight
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v3
- uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_LOGIN }}
password: ${{ secrets.DOCKER_PASSWORD }}
- uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
# Publish a new release from git tag.
- uses: goreleaser/[email protected]
if: startsWith(github.ref, 'refs/tags/')
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Publish nightly build.
- uses: goreleaser/[email protected]
if: github.event_name == 'schedule'
with:
version: latest
args: release --rm-dist --nightly
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}