update github action
Former-commit-id: 909a8999745388e1efc6a0087d8f1d2cb339b54f [formerly 9bcc5c7d966659b56d80cab610d687b408b531a3] [formerly 708ea0512cfa490eaa9fafa1f92ea16bdc21cf05 [formerly e05dcfca80571c20cee55718528997e65c8c6110]] Former-commit-id: 21cec496e03f2289531cc5cb20f3b72b8e5b982e [formerly 24e36e46cb412e2743754908cf01ac6c9f88a5db] Former-commit-id: cb9af7fe2caffdc2d6c83a14b7c34eb5ef63e2aa Former-commit-id: 0542a1b9531595d1084c2f70c830d536f84cb0b0 Former-commit-id: 63bb8b12a848a54da8939ab9fcc550de116d77ce Former-commit-id: d139330add70fde1ad06f12c0076b469f20f12e8 [formerly d68fa5332df916927236e4ebd71db495dce065df] Former-commit-id: 6add272957a89d43f310f44c70b17ca2cecd927a
This commit is contained in:
parent
482df216ca
commit
0973359ea3
3 changed files with 76 additions and 29 deletions
43
.github/workflows/release.yaml
vendored
43
.github/workflows/release.yaml
vendored
|
@ -110,37 +110,22 @@ jobs:
|
|||
- name: Checkout Git repo
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# Download all artifacts in zip format
|
||||
# https://github.com/actions/download-artifact/issues/143
|
||||
- name: Download artifacts
|
||||
uses: actions/github-script@v6
|
||||
# Download all artifacts
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
script: |
|
||||
let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
run_id: context.payload.workflow_run.id,
|
||||
});
|
||||
for (const artifact of allArtifacts.data.artifacts)
|
||||
{
|
||||
let download = await github.rest.actions.downloadArtifact({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
artifact_id: artifact.id,
|
||||
archive_format: 'zip',
|
||||
});
|
||||
|
||||
let fs = require('fs');
|
||||
fs.mkdirSync('artifacts');
|
||||
fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/artifacts/${artifact.name}.zip`, Buffer.from(download.data));
|
||||
}
|
||||
path: artifacts
|
||||
|
||||
- name: list artifacts
|
||||
run: find artifacts/
|
||||
|
||||
- uses: "marvinpinto/action-automatic-releases@latest"
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
|
||||
- name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v5
|
||||
with:
|
||||
repo_token: "${{ secrets.RELEASE_TOKEN }}"
|
||||
prerelease: true
|
||||
files: |
|
||||
artifacts/*
|
||||
distribution: goreleaser
|
||||
version: latest
|
||||
args: release --clean --skip=validate
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue