Skip to content

Release (Snapshot) #155

Release (Snapshot)

Release (Snapshot) #155

Workflow file for this run

name: Release (Snapshot)
on:
workflow_dispatch:
jobs:
snapshot-build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
name: linux
- os: macos-latest
name: darwin
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v4
with:
go-version: "1.20"
check-latest: true
cache: true
- uses: actions/cache@v3
with:
path: _tools/
key: ${{ runner.os }}-go-tools${{ hashFiles('_tools/go.sum') }}
restore-keys: |
${{ runner.os }}-go-tools-
- uses: actions/setup-node@v3
with:
node-version: "18"
- name: Install GCC for arm64
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update && \
sudo apt-get install -y gcc-aarch64-linux-gnu
- name: Install Quill
if: matrix.os == 'macos-latest'
run: |
curl -sSfL https://raw.githubusercontent.com/anchore/quill/main/install.sh | sh -s -- -b $GITHUB_WORKSPACE/bin
echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_ENV
- uses: magefile/mage-action@v2
with:
version: latest
args: prep
- name: GoReleaser (Snapshot) Build
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser-pro
version: latest
args: release --clean --snapshot -f .goreleaser.${{ matrix.name }}.yml
env:
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ANALYTICS_KEY: ${{ secrets.ANALYTICS_KEY }}
QUILL_SIGN_P12: ${{ secrets.QUILL_SIGN_P12 }}
QUILL_SIGN_PASSWORD: ${{ secrets.QUILL_SIGN_PASSWORD }}
QUILL_NOTARY_KEY: ${{ secrets.QUILL_NOTARY_KEY }}
QUILL_NOTARY_KEY_ID: ${{ secrets.QUILL_NOTARY_KEY_ID }}
QUILL_NOTARY_ISSUER: ${{ secrets.QUILL_NOTARY_ISSUER }}
- uses: actions/upload-artifact@v3
with:
name: flipt-snapshot-${{ matrix.name }}
path: dist/flipt_${{ matrix.name }}_*/flipt
snapshot-release:
runs-on: ubuntu-latest
needs: snapshot-build
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v4
with:
go-version: "1.20"
check-latest: true
cache: true
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- uses: actions/download-artifact@v3
with:
name: flipt-snapshot-linux
path: tmp/dist
- uses: actions/download-artifact@v3
with:
name: flipt-snapshot-darwin
path: tmp/dist
- name: Install Syft
run: |
curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin
- name: GoReleaser (Snapshot) Release
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser-pro
version: latest
args: release --snapshot -f .goreleaser.multi.yml
env:
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@v3
with:
name: flipt-snapshot
path: dist/*