-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (35 loc) · 1.01 KB
/
main.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
name: release
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
test-and-check-release:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Run tests
uses: ngergs/composite-actions/go-test@main
- name: Check for release
id: semrel
uses: google-github-actions/release-please-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
outputs:
is-release: ${{ steps.semrel.outputs.releases_created }}
version: ${{ steps.semrel.outputs.tag_name }}
release:
needs: test-and-check-release
if: needs.test-and-check-release.outputs.is-release == 'true'
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Release
uses: ngergs/composite-actions/go-release@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
dockerhub-username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub-password: ${{ secrets.DOCKERHUB_TOKEN }}