mirror of
https://gitea.com/gitea/act_runner.git
synced 2026-03-25 08:15:02 +01:00
chore: refactor snapshot upload (#15)
This commit is contained in:
101
.github/workflows/checks.yml
vendored
101
.github/workflows/checks.yml
vendored
@@ -108,82 +108,43 @@ jobs:
|
|||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-go-
|
${{ runner.os }}-go-
|
||||||
- name: GoReleaser
|
- name: GoReleaser
|
||||||
|
id: goreleaser
|
||||||
uses: goreleaser/goreleaser-action@v6
|
uses: goreleaser/goreleaser-action@v6
|
||||||
with:
|
with:
|
||||||
version: latest
|
version: latest
|
||||||
args: release --snapshot --clean
|
args: release --snapshot --clean
|
||||||
- name: Capture x86_64 (64-bit) Linux binary
|
- name: Setup Node
|
||||||
if: ${{ !env.ACT }}
|
uses: actions/setup-node@v4
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
with:
|
||||||
name: act-linux-amd64
|
node-version: 20
|
||||||
path: dist/act-cli_linux_amd64_v1/act-cli
|
- name: Install @actions/artifact
|
||||||
- name: Capture i386 (32-bit) Linux binary
|
run: npm install @actions/artifact
|
||||||
if: ${{ !env.ACT }}
|
- name: Upload All
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/github-script@v7
|
||||||
with:
|
with:
|
||||||
name: act-linux-i386
|
script: |
|
||||||
path: dist/act-cli_linux_386/act-cli
|
const {DefaultArtifactClient} = require('@actions/artifact');
|
||||||
- name: Capture arm64 (64-bit) Linux binary
|
const aartifact = new DefaultArtifactClient();
|
||||||
if: ${{ !env.ACT }}
|
var artifacts = JSON.parse(process.env.ARTIFACTS);
|
||||||
uses: actions/upload-artifact@v4
|
for(var artifact of artifacts) {
|
||||||
with:
|
if(artifact.type === "Binary") {
|
||||||
name: act-linux-arm64
|
const {id, size} = await aartifact.uploadArtifact(
|
||||||
path: dist/act-cli_linux_arm64/act-cli
|
// name of the artifact
|
||||||
- name: Capture armv6 (32-bit) Linux binary
|
`${artifact.name}-${artifact.target}`,
|
||||||
if: ${{ !env.ACT }}
|
// files to include (supports absolute and relative paths)
|
||||||
uses: actions/upload-artifact@v4
|
[artifact.path],
|
||||||
with:
|
process.cwd(),
|
||||||
name: act-linux-armv6
|
{
|
||||||
path: dist/act-cli_linux_arm_6/act-cli
|
// optional: how long to retain the artifact
|
||||||
- name: Capture armv7 (32-bit) Linux binary
|
// if unspecified, defaults to repository/org retention settings (the limit of this value)
|
||||||
if: ${{ !env.ACT }}
|
retentionDays: 10
|
||||||
uses: actions/upload-artifact@v4
|
}
|
||||||
with:
|
);
|
||||||
name: act-linux-armv7
|
console.log(`Created artifact with id: ${id} (bytes: ${size}`);
|
||||||
path: dist/act-cli_linux_arm_7/act-cli
|
}
|
||||||
- name: Capture riscv64 (64-bit) Linux binary
|
}
|
||||||
if: ${{ !env.ACT }}
|
env:
|
||||||
uses: actions/upload-artifact@v4
|
ARTIFACTS: ${{ steps.goreleaser.outputs.artifacts }}
|
||||||
with:
|
|
||||||
name: act-linux-riscv64
|
|
||||||
path: dist/act-cli_linux_riscv64/act-cli
|
|
||||||
- name: Capture x86_64 (64-bit) Windows binary
|
|
||||||
if: ${{ !env.ACT }}
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: act-windows-amd64
|
|
||||||
path: dist/act-cli_windows_amd64_v1/act-cli.exe
|
|
||||||
- name: Capture i386 (32-bit) Windows binary
|
|
||||||
if: ${{ !env.ACT }}
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: act-windows-i386
|
|
||||||
path: dist/act-cli_windows_386/act-cli.exe
|
|
||||||
- name: Capture arm64 (64-bit) Windows binary
|
|
||||||
if: ${{ !env.ACT }}
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: act-windows-arm64
|
|
||||||
path: dist/act-cli_windows_arm64/act-cli.exe
|
|
||||||
- name: Capture armv7 (32-bit) Windows binary
|
|
||||||
if: ${{ !env.ACT }}
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: act-windows-armv7
|
|
||||||
path: dist/act-cli_windows_arm_7/act-cli.exe
|
|
||||||
- name: Capture x86_64 (64-bit) MacOS binary
|
|
||||||
if: ${{ !env.ACT }}
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: act-macos-amd64
|
|
||||||
path: dist/act-cli_darwin_amd64_v1/act-cli
|
|
||||||
- name: Capture arm64 (64-bit) MacOS binary
|
|
||||||
if: ${{ !env.ACT }}
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: act-macos-arm64
|
|
||||||
path: dist/act-cli_darwin_arm64/act-cli
|
|
||||||
- name: Chocolatey
|
- name: Chocolatey
|
||||||
uses: ./.github/actions/choco
|
uses: ./.github/actions/choco
|
||||||
with:
|
with:
|
||||||
|
|||||||
Reference in New Issue
Block a user