Merge pull request #222 from invopop/release-0.63.1 #128
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Automatically tag a merge with master, or build a new image from the tag. | |
# | |
# Secrets required: | |
# * `DO_TOKEN` - DigitalOcean private token | |
# * `DO_REGISTRY_NAME` - DigitalOcean name of the registry | |
# * `GO_MOD_USER` - Machine username to read private repos | |
# * `GO_MOD_PASS` - Machine password to read private repos | |
# | |
name: Release | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "version.go" | |
jobs: | |
tag-build-publish: | |
name: Tag | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: "0" # make sure we get all commits! | |
- name: Read current version | |
run: | | |
grep 'const VERSION' version.go | sed -e 's/const VERSION Version = "\(v[^"]*\)"/GOBL_VERSION=\1/' >> $GITHUB_ENV | |
# This stopped working as it couldn't find the git repo: | |
#- name: "Release tag" | |
# uses: actions-ecosystem/action-push-tag@v1 | |
# with: | |
# tag: ${{ env.GOBL_VERSION }} | |
- name: Bump version and push tag | |
id: bump | |
uses: anothrNick/[email protected] | |
env: | |
CUSTOM_TAG: ${{ env.GOBL_VERSION }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
RELEASE_BRANCHES: main | |
# WITH_V: true |