Skip to content

Merge pull request #63 from MannemSolutions/hotfix/upgrading #41

Merge pull request #63 from MannemSolutions/hotfix/upgrading

Merge pull request #63 from MannemSolutions/hotfix/upgrading #41

Workflow file for this run

name: Release workflow for tagged versions
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v0.2.19, v0.2.14a
jobs:
release:
runs-on: ubuntu-latest
strategy:
matrix:
# build and publish in parallel: linux/386, linux/amd64, windows/386, windows/amd64, darwin/amd64
goos: [linux, darwin]
goarch: ["386", amd64, arm64]
exclude:
- goarch: "386"
goos: darwin
- goarch: "arm64"
goos: windows
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Create release
uses: softprops/action-gh-release@v1
- name: Build and release binaries
uses: wangyoucao577/go-release-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
project_path: "./cmd/pgquartz"
binary_name: pgquartz
extra_files: LICENSE README.md
pre_command: ./set_version.sh
sha256sum: TRUE
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Set version
run: ./set_version.sh
- name: Log in to Docker Hub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: mannemsolutions/pgquartz
- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}