Skip to content

Commit

Permalink
Bump Up GoReleaser v2
Browse files Browse the repository at this point in the history
Signed-off-by: Fei Su <[email protected]>
  • Loading branch information
acefei committed Aug 6, 2024
1 parent 5685c72 commit 3cbad09
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,30 @@ jobs:
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
- name: Download and extract SDK
shell: bash
# If "XENSERVER_SDK_URL" is setup in the repository variable, will use it
# as SDK URL, otherwise, will extract the SDK version from https://www.xenserver.com/downloads.
# and download the SDK from https://github.com/xapi-project/xen-api/releases accordingly.
# it will help to ignore the "Download Agreement" from the official XenServer SDK download page.
run: |
url=${{ vars.XENSERVER_SDK_URL }}
if [ -z "$url" ]; then
version=$(curl -s 'https://www.xenserver.com/downloads' | \
grep -oE 'Software Development Kit \(SDK\) [0-9]+\.[0-9]+\.[0-9]+' | \
grep -oE '[0-9]+\.[0-9]+\.[0-9]+$')
url="https://github.com/xapi-project/xen-api/releases/download/v${version}/Go-SDK-prerelease-unsigned.zip"
fi
curl -L "$url" -o xenserver-sdk.zip
unzip xenserver-sdk.zip -d sdk_temp
mkdir -p goSDK
mv sdk_temp/sdk_go/src/* goSDK/
rm -rf sdk_temp xenserver-sdk.zip
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: "~> v2"
args: release --clean
env:
# GitHub sets the GITHUB_TOKEN secret automatically.
Expand Down
5 changes: 2 additions & 3 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
version: 2
# Visit https://goreleaser.com for documentation on how to customize this
# behavior.
before:
Expand Down Expand Up @@ -41,7 +42,7 @@ checksum:
signs:
- artifacts: checksum
args:
# if you are using this in a GitHub action or some other automated pipeline, you
# if you are using this in a GitHub action or some other automated pipeline, you
# need to pass the batch flag to indicate its not interactive.
- "--batch"
- "--local-user"
Expand All @@ -56,5 +57,3 @@ release:
name_template: '{{ .ProjectName }}_{{ .Version }}_manifest.json'
# If you want to manually examine the release before its live, uncomment this line:
# draft: true
changelog:
skip: true

0 comments on commit 3cbad09

Please sign in to comment.