Skip to content

Cleanup

Cleanup #30

Workflow file for this run

name: release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+-[a-zA-Z0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]'
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.21
uses: actions/setup-go@v1
with:
go-version: 1.21
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v1
- name: Get dependencies
run: |
go get -v -t -d ./...
- name: Build
run: go build -v .
- name: Build and pack neargo for Linux
run: |
GOOS=linux GOARCH=amd64 go build .
tar -czf neargo-linux-amd64.tar.gz neargo
- name: Build and pack neargo for Linux ARMv7
run: |
GOOS=linux GOARCH=arm GOARM=7 go build .
tar -czf neargo-linux-armv7.tar.gz neargo
- name: Build and pack neargo for Linux ARM64
run: |
GOOS=linux GOARCH=arm64 go build .
tar -czf neargo-linux-arm64.tar.gz neargo
- name: Build and pack neargo for macOS
run: |
GOOS=darwin GOARCH=amd64 go build .
tar -czf neargo-macos-amd64.tar.gz neargo
- name: Build and pack neargo for macOS ARM64 (M1)
run: |
GOOS=darwin GOARCH=arm64 go build .
tar -czf neargo-macos-arm64.tar.gz neargo
- name: Build and pack neargo for Windows
run: |
GOOS=windows GOARCH=amd64 go build .
zip neargo-windows-amd64.zip neargo.exe
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "${{ steps.get_version.outputs.VERSION }}"
prerelease: false
title: "neargo ${{ steps.get_version.outputs.VERSION }}"
files: |
neargo-linux-amd64.tar.gz
neargo-linux-armv7.tar.gz
neargo-linux-arm64.tar.gz
neargo-macos-amd64.tar.gz
neargo-macos-arm64.tar.gz
neargo-windows-amd64.zip