Cut v1.2.0 release (#9) #41
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: main | |
on: | |
push: | |
pull_request: | |
release: | |
types: [created] | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go 1.22 | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.22 | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4 | |
- name: Lint, test and build | |
run: | | |
# Install staticcheck for linting | |
go install honnef.co/go/tools/cmd/[email protected] | |
# Lint and format | |
make lint | |
make format | |
# Exit if after formatting there are any code differences | |
git diff --exit-code | |
# Run tests | |
make test | |
# Build and package | |
if [ ${{ github.event_name }} == "release" ]; then | |
VERSION="${{ github.event.release.tag_name }}" | |
else | |
VERSION=$(git rev-parse --short ${{ github.sha }}) | |
fi | |
make VERSION="${VERSION}" | |
make zip | |
- name: Publish linux 386 | |
if: github.event_name == 'release' | |
uses: Shopify/[email protected] | |
with: | |
name: simple-proxy_linux_386.zip | |
path: dist/simple-proxy_linux_386.zip | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish linux amd64 | |
if: github.event_name == 'release' | |
uses: Shopify/[email protected] | |
with: | |
name: simple-proxy_linux_amd64.zip | |
path: dist/simple-proxy_linux_amd64.zip | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish linux arm | |
if: github.event_name == 'release' | |
uses: Shopify/[email protected] | |
with: | |
name: simple-proxy_linux_arm.zip | |
path: dist/simple-proxy_linux_arm.zip | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish linux arm64 | |
if: github.event_name == 'release' | |
uses: Shopify/[email protected] | |
with: | |
name: simple-proxy_linux_arm64.zip | |
path: dist/simple-proxy_linux_arm64.zip | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish darwin amd64 | |
if: github.event_name == 'release' | |
uses: Shopify/[email protected] | |
with: | |
name: simple-proxy_darwin_amd64.zip | |
path: dist/simple-proxy_darwin_amd64.zip | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish darwin arm64 | |
if: github.event_name == 'release' | |
uses: Shopify/[email protected] | |
with: | |
name: simple-proxy_darwin_arm64.zip | |
path: dist/simple-proxy_darwin_arm64.zip | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish windows 386 | |
if: github.event_name == 'release' | |
uses: Shopify/[email protected] | |
with: | |
name: simple-proxy_windows_386.zip | |
path: dist/simple-proxy_windows_386.zip | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish windows amd64 | |
if: github.event_name == 'release' | |
uses: Shopify/[email protected] | |
with: | |
name: simple-proxy_windows_amd64.zip | |
path: dist/simple-proxy_windows_amd64.zip | |
repo-token: ${{ secrets.GITHUB_TOKEN }} |