Merge pull request #91 from sans-sroc/renovate/goreleaser-goreleaser-… #169
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: tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
paths: | |
- '**/*.go' | |
- main.go | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
go-version: [1.22.x] | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
steps: | |
- name: setup-go | |
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- name: Test | |
run: go test ./... | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: setup-go | |
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- name: "build" | |
run: | | |
make release-all | |
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4 | |
with: | |
name: release | |
path: release/* | |
create: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
needs: build | |
steps: | |
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4 | |
with: | |
name: release | |
- run: chmod +x integrity* | |
if: ${{ matrix.os != 'windows-latest' }} | |
- run: ./integrity.exe create -n "100.00.0" --filename sans-integrity-${{ matrix.os }}.yml | |
if: ${{ matrix.os == 'windows-latest' }} | |
- run: ./integrity-linux create -n "200.00.0" --filename sans-integrity-${{ matrix.os }}.yml | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
- run: ./integrity create -n "300.00.0" --filename sans-integrity-${{ matrix.os }}.yml | |
if: ${{ matrix.os == 'macos-latest' }} | |
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4 | |
with: | |
name: integrity-${{ matrix.os }} | |
path: sans-integrity* | |
validate: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
dst_os: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
needs: | |
- create | |
steps: | |
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4 | |
with: | |
name: release | |
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4 | |
with: | |
name: integrity-${{ matrix.dst_os }} | |
- run: chmod +x integrity* | |
if: ${{ matrix.os != 'windows-latest' }} | |
- run: ./integrity.exe validate --filename sans-integrity-${{ matrix.dst_os }}.yml | |
if: ${{ matrix.os == 'windows-latest' }} | |
- run: ./integrity-linux validate --filename sans-integrity-${{ matrix.dst_os }}.yml | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
- run: ./integrity validate --filename sans-integrity-${{ matrix.dst_os }}.yml | |
if: ${{ matrix.os == 'macos-latest' }} |