fix: names, tags, deprecated fields #32
Workflow file for this run
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
# From: https://goreleaser.com/ci/actions/#usage | |
name: release | |
env: | |
GO111MODULE: on | |
GO_VERSION: 1.21 | |
on: | |
push: | |
tags: | |
- '*' | |
permissions: | |
contents: write | |
jobs: | |
build-linux-binary: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: gcc install | |
run: sudo apt-get update; sudo apt install gcc-aarch64-linux-gnu | |
- name: Get tag | |
uses: little-core-labs/get-git-tag@v3.0.2 | |
id: tag | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Cache code | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/go/pkg/mod # Module download cache | |
~/.cache/go-build # Build cache (Linux) | |
~/Library/Caches/go-build # Build cache (Mac) | |
"%LocalAppData%\\go-build" # Build cache (Windows) | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v3 | |
with: | |
version: latest | |
args: release --skip=publish --config .goreleaser-for-linux.yml | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GORELEASER_PREVIOUS_TAG: ${{steps.latest_version.outputs.release}} | |
- name: Upload | |
uses: actions/upload-artifact@v4 | |
with: | |
name: alert_system_linux | |
path: | | |
dist/alert_system_*.zip | |
dist/checksums.txt | |
dist/CHANGELOG.md | |
create-release: | |
#needs: [build-linux-binary, build-darwin-binary, build-windows-binary] | |
needs: [build-linux-binary] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Make directories | |
run: | | |
mkdir -p ./dist/linux | |
mkdir -p ./dist/darwin | |
mkdir -p ./dist/windows | |
- name: Download linux binaries | |
uses: actions/download-artifact@v4 | |
with: | |
name: alert_system_linux | |
path: ./tmp-build/linux | |
#- name: Download darwin binaries | |
# uses: actions/download-artifact@v3 | |
# with: | |
# name: kubectl-eds-darwin | |
# path: ./tmp-build/darwin | |
#- name: Download windows binaries | |
# uses: actions/download-artifact@v3 | |
# with: | |
# name: kubectl-eds-windows | |
# path: ./tmp-build/windows | |
- name: Get tag | |
uses: little-core-labs/get-git-tag@v3.0.2 | |
id: tag | |
- name: Prepare ./dist folder | |
run: | | |
mkdir -p ./dist | |
mv ./tmp-build/linux/*.zip ./dist | |
#- name: Generate Plugin manifest | |
# run: ./hack/release/generate-plugin-manifest.sh ${{steps.tag.outputs.tag}} | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
body_path: dist/CHANGELOG.md | |
prerelease: ${{ contains(github.ref, '-rc.') }} | |
files: | | |
dist/*.zip | |
dist/*.tar.gz | |
env: | |
COMMIT_TAG: ${{steps.tag.outputs.tag}} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |