-
-
Notifications
You must be signed in to change notification settings - Fork 9
50 lines (49 loc) · 1.68 KB
/
release.yaml
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
# This workflow is triggered manually
on:
workflow_dispatch:
inputs:
version_bump_type:
description: 'Version Bump Type (major, minor, patch)'
required: true
default: 'patch'
version_metadata_path:
description: 'Path to file containing Version string'
required: true
default: 'pkg/version/version.go'
jobs:
release:
name: Create Release Commit
runs-on: ubuntu-latest
container: ghcr.io/packagrio/packagr:latest-golang
# Service containers to run with `build` (Required for end-to-end testing)
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Bump version
id: bump_version
uses: packagrio/action-bumpr-go@master
with:
version_bump_type: ${{ github.event.inputs.version_bump_type }}
version_metadata_path: ${{ github.event.inputs.version_metadata_path }}
github_token: ${{ secrets.GITHUB_TOKEN }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Leave this line unchanged
# - name: Test
# run: |
# go mod
- name: Commit Changes Locally
id: commit
uses: packagrio/action-releasr-go@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Leave this line unchanged
with:
version_metadata_path: ${{ github.event.inputs.version_metadata_path }}
- name: Publish Release
id: publish
uses: packagrio/action-publishr-go@master
env:
# This is necessary in order to push a commit to the repo
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Leave this line unchanged