Merge branch 'devel' #18
Workflow file for this run
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
name: "Create release" | |
on: | |
push: | |
tags: | |
- "*" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -l -e -o pipefail {0} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: "Fetch Tags" | |
# Workaround for https://github.com/actions/checkout/issues/290 | |
run: git fetch --tags --force | |
- name: "Set up Go" | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: "go.mod" | |
- name: "Get release variables" | |
run: | | |
echo 'RELEASE_VERSION='$(git describe --always --tags --dirty) >> $GITHUB_ENV | |
echo 'MASTER_SHA='$(git rev-parse origin/master) >> $GITHUB_ENV | |
echo 'GIT_URL='$(git remote get-url origin) >> $GITHUB_ENV | |
echo 'GIT_COMMIT='$(git log --pretty=format:'%H' -n 1) >> $GITHUB_ENV | |
- name: "Build executables" | |
run: | | |
make dist | |
- name: "Create Release" | |
uses: ncipollo/[email protected] | |
with: | |
name: ${{ env.RELEASE_VERSION }} | |
prerelease: ${{ !(github.sha == env.MASTER_SHA) }} | |
artifacts: "build/*.tar.bz2,build/*.tar.bz2.sha256" | |
removeArtifacts: true | |
artifactErrorsFailBuild: true | |
generateReleaseNotes: true | |
- name: "Set up Docker Buildx" | |
uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
- name: "Login to Docker registry" | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: "Build Docker image" | |
run: | | |
make docker GITHUB_ACTIONS=${GITHUB_ACTIONS} GITHUB_REPOSITORY_OWNER=${{ github.repository_owner }} | |
- name: "Push Docker image" | |
run: | | |
docker images | |
make push GITHUB_ACTIONS=${GITHUB_ACTIONS} GITHUB_REPOSITORY_OWNER=${{ github.repository_owner }} |