Skip to content

v3.1.5

v3.1.5 #4

Workflow file for this run

name: Release Build
on:
release:
types: [created]
jobs:
release:
strategy:
matrix:
type: [build, build_musl]
platform: [ubuntu-latest]
go-version: [1.20.1]
name: Release and Build
runs-on: ${{ matrix.platform }}
steps:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
ref: main
- name: Build
uses: px-org/build-action@main
with:
type: ${{ matrix.type }}
go-version: ${{ matrix.go-version }}
artifact-name: "PanIndex"
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: ${{github.workspace}}/dist/compress/*
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
sha256:
runs-on: ubuntu-latest
needs: release
steps:
- name: Compress
run: |
mkdir -p ${{github.workspace}}/dist
cd ${{github.workspace}}/dist
assets=$(curl -s https://api.github.com/repos/px-org/PanIndex/releases/latest | jq -c '.assets[]' | jq -r '.browser_download_url')
for url in $assets
do
curl -L ${url} -O
done
for f in $(find * -type f -name "*"); do
sha256sum "$f" >> sha256.list
done
shell: bash
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: ${{github.workspace}}/dist/sha256.list
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}