Skip to content

Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows #60

Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows

Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows #60

Workflow file for this run

name: build
on:
push:
branches:
- master
pull_request:
types: ['opened', 'synchronize']
paths:
- '**.go'
- go.mod
- '.github/workflows/**'
jobs:
artifact-build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
- name: Setup dependencies
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update -q
sudo apt-get install -qqy build-essential software-properties-common pkg-config wget libpcsclite-dev
- name: Build darwin
if: matrix.os == 'macos-latest'
run: |
make build/awsu-darwin-amd64
mv build/awsu-darwin-amd64 build/awsu-macos-latest-amd64
- name: Build linux
if: matrix.os == 'ubuntu-latest'
run: |
make build/awsu-linux-amd64
mv build/awsu-linux-amd64 build/awsu-ubuntu-latest-amd64
- uses: actions/upload-artifact@v3
with:
name: awsu-${{ matrix.os }}-amd64
path: build/awsu-${{ matrix.os }}-amd64
release-test:
runs-on: ubuntu-latest
needs: [artifact-build]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
# need to setup to avoid https://goreleaser.com/deprecations/#builds-for-darwinarm64
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
- name: Download macos
uses: actions/[email protected]
with:
name: awsu-macos-latest-amd64
path: build
- name: Download linux
uses: actions/[email protected]
with:
name: awsu-ubuntu-latest-amd64
path: build
- name: Correct goreleaser prebuilt path
run: |
# as it is the format goreleaser expects. See .goreleaser.yml -> prebuilt -> path
# we need at least an arm url for brew: https://github.com/kreuzwerker/homebrew-taps/issues/11
cp build/awsu-ubuntu-latest-amd64 build/awsu_linux_amd64
cp build/awsu-ubuntu-latest-amd64 build/awsu_linux_arm64
cp build/awsu-macos-latest-amd64 build/awsu_darwin_amd64
cp build/awsu-macos-latest-amd64 build/awsu_darwin_arm64
ls -lash build
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser-pro
version: latest
args: release --clean --skip-publish --snapshot --skip-sign --debug
env:
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_TOKEN: ${{ secrets.GORELEASER_TOKEN }}
- name: List goreleaser dist folder contents
run: |
ls -lash dist