Skip to content

v1.7.1

v1.7.1 #11

name: Release_auto_update
on:
release:
types:
- published
# push:
# tags:
# - 'v*'
# workflow_dispatch:
jobs:
build:
strategy:
matrix:
go-version: [1.22.0]
platform: [macOS-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@main
- name: Install Go
if: success()
uses: actions/setup-go@main
with:
go-version: ${{ matrix.go-version }}
- name: Install Task
uses: arduino/setup-task@v2
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Run unit tests
run: go test -v -race -cover -coverprofile coverage.txt -covermode=atomic ./...
- name: Parse Event
run: |
echo "tag=$(jq -r '.release.tag_name' "${GITHUB_EVENT_PATH}" | sed s/^v//)" >> $GITHUB_ENV
- name: Build and pack
run: |
# build package
task ak:release ARCH=amd64
task ak:release ARCH=arm64
lipo -create -output .workflow/exe exe_amd64 exe_arm64
rm exe_amd64
rm exe_arm64
# pack
cd .workflow
plutil -replace version -string "${{ env.tag }}" info.plist
zip -r ../"docs-alfred_auto_update-${{ env.tag }}.alfredworkflow" .
cd ..
echo "artifact=$(echo "docs-alfred_auto_update-${{ env.tag }}.alfredworkflow")" >> $GITHUB_ENV
- uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: "${{ env.artifact }}"