Skip to content

Bump version to v0.3.3 #36

Bump version to v0.3.3

Bump version to v0.3.3 #36

Workflow file for this run

name: Release
on:
push:
branches:
- "test-release*"
- "*dist*"
tags:
- v[0-9].[0-9]+.[0-9]+
jobs:
build:
name: build-rz-pm
runs-on: ubuntu-22.04
strategy:
matrix:
goos: [windows, darwin, freebsd, openbsd, netbsd, linux, android]
goarch: [amd64, arm64]
include:
- goarch: amd64
asset_arch: x86_64
- goarch: arm64
asset_arch: arm64
- goos: linux
goarch: arm
asset_arch: arm7
goarm: 7
- goos: linux
goarch: ppc64le
asset_arch: ppc64le
- goos: linux
goarch: s390x
asset_arch: s390x
- goos: android
goarch: arm64
asset_arch: arm64
- goos: android
goarch: arm
asset_arch: arm
goarm: 7
cgo_enabled: 1
cc: /tmp/android-ndk/android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi21-clang
steps:
- name: Set up Go 1.19
uses: actions/setup-go@v1
with:
go-version: 1.19
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v1
- name: Install Android NDK
if: matrix.goos == 'android'
run: |
curl -L https://dl.google.com/android/repository/android-ndk-r21e-linux-x86_64.zip -o android-ndk.zip
unzip android-ndk.zip -d /tmp/android-ndk
- name: Build the Go binary
run: go build
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
GOARM: ${{ matrix.goarm }}
CGO_ENABLED: ${{ matrix.cgo_enabled }}
CC: ${{ matrix.cc }}
- name: Rename rz-pm
run: mv ./rz-pm${{ matrix.goos == 'windows' && '.exe' || '' }} ./rz-pm-${{ matrix.goos }}-${{ matrix.asset_arch }}${{ matrix.goos == 'windows' && '.exe' || '' }}
- name: Upload rz-pm build
uses: actions/upload-artifact@v3
with:
name: rz-pm-${{ matrix.goos }}-${{ matrix.asset_arch }}
path: ./rz-pm-${{ matrix.goos }}-${{ matrix.asset_arch }}${{ matrix.goos == 'windows' && '.exe' || '' }}
create_release:
name: create_release
runs-on: ubuntu-22.04
if: startsWith(github.ref, 'refs/tags/') || contains(github.ref, 'test-release')
needs: [build]
steps:
- uses: actions/checkout@v2
- name: Check version matches
if: startsWith(github.ref, 'refs/tags/')
run: |
[[ "$(grep app.Version main.go | sed -r 's/.*\"(v[0-9\.]+)\"/\1/')" =~ "${{ github.ref_name }}" ]]
- uses: actions/download-artifact@v3
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: Release ${{ github.ref }}
draft: true
prerelease: false
files: |
./rz-pm-*/*