Skip to content

Commit

Permalink
Update release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
airycanon committed Apr 10, 2024
1 parent 284491a commit 1c37111
Showing 1 changed file with 12 additions and 19 deletions.
31 changes: 12 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,27 @@ on:
- v*
jobs:
release:
strategy:
matrix:
os: ["linux","windows","darwin"]
arch: ["amd64","arm64"]
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.22.x
- run: ./test.sh
- run: go mod download
- run: go test -v ./...
- run: go build -v .
- run: ./test.sh
- run: GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} go build -o release/crd-ref-docs-${{ matrix.os }}-${{ matrix.arch }} -v .

- name: Create release
uses: actions/create-release@v1
id: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false

- name: Upload artifacts
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
upload_url: ${{ steps.release.outputs.upload_url }}
asset_path: ./crd-ref-docs
asset_name: crd-ref-docs
asset_content_type: application/octet-stream
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: release/crd-ref-docs-${{ matrix.os }}-${{ matrix.arch }}
asset_name: crd-ref-docs-${{ matrix.os }}-${{ matrix.arch }}
tag: ${{ github.ref }}

0 comments on commit 1c37111

Please sign in to comment.