mirror of
https://github.com/shanmiteko/LotteryAutoScript.git
synced 2026-06-04 21:01:17 +08:00
ci: fix "an artifact with this name already exists on the workflow run"
This commit is contained in:
parent
5a86a0407a
commit
df3e97d3bf
2
.github/workflows/docker.yml
vendored
2
.github/workflows/docker.yml
vendored
@ -16,7 +16,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
- name: Set up Docker Buildx
|
||||
|
||||
2
.github/workflows/mirror.yml
vendored
2
.github/workflows/mirror.yml
vendored
@ -10,7 +10,7 @@ jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Mirror + trigger CI
|
||||
|
||||
2
.github/workflows/npmp.yml
vendored
2
.github/workflows/npmp.yml
vendored
@ -12,7 +12,7 @@ jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- uses: JS-DevTools/npm-publish@v1
|
||||
with:
|
||||
token: ${{ secrets.NPM_TOKEN }}
|
||||
|
||||
14
.github/workflows/pkg.yml
vendored
14
.github/workflows/pkg.yml
vendored
@ -30,16 +30,16 @@ jobs:
|
||||
# nodev: 12
|
||||
steps:
|
||||
- name: "Checkout codes"
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
- name: "Use Node.js"
|
||||
uses: actions/setup-node@v3
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "*"
|
||||
- name: "Pkg this"
|
||||
run: |
|
||||
npm run pkg "node${{ matrix.nodev }}-${{ matrix.platform }}-x64"
|
||||
- name: "Upload to artifact"
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: node${{ matrix.nodev }}-${{ matrix.platform }}-x64
|
||||
path: "dist/*.zip"
|
||||
@ -62,14 +62,14 @@ jobs:
|
||||
- platform: alpine
|
||||
steps:
|
||||
- name: "Checkout codes"
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
- name: "Pkg this"
|
||||
run: |
|
||||
npm run pkg "${{ matrix.platform }}-arm64"
|
||||
npm run pkg "node18-${{ matrix.platform }}-arm64"
|
||||
- name: "Upload to artifact"
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: arm64
|
||||
name: node18-${{ matrix.platform }}-arm64
|
||||
path: "dist/*.zip"
|
||||
- name: "Upload to release draft"
|
||||
uses: xresloader/upload-to-github-release@v1
|
||||
|
||||
@ -28,12 +28,12 @@ mkdir -p $TARGET_DIR
|
||||
npm install
|
||||
|
||||
if [[ "$1" == *"arm"* ]]; then
|
||||
OUTFILE="$TARGET_DIR/lottery-auto-script-node18-$1"
|
||||
OUTFILE="$TARGET_DIR/lottery-auto-script-$1"
|
||||
sudo podman run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
||||
podman run -it \
|
||||
--rm \
|
||||
-v ${PWD}:/root/lottery \
|
||||
shanmite/pkg-arm64 -t "node18.5.0-$1" -o "$OUTFILE" .
|
||||
shanmite/pkg-arm64 -t "node18-$1" -o "$OUTFILE" .
|
||||
elif [[ "$1" == *"x64"* ]]; then
|
||||
OUTFILE="$TARGET_DIR/lottery-auto-script-$1"
|
||||
npx pkg -t "$1" -o "$OUTFILE" .
|
||||
|
||||
Loading…
Reference in New Issue
Block a user