Skip to content

Commit 93b399b

Browse files
committed
Simplify: skip npm/release/R2 upload when not a tag push
1 parent e646efb commit 93b399b

1 file changed

Lines changed: 5 additions & 11 deletions

File tree

.github/workflows/release.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,9 @@ on:
55
tags:
66
- '[0-9]+.[0-9]+.[0-9]+'
77
workflow_dispatch:
8-
inputs:
9-
dry-run:
10-
description: 'Dry run (npm --dry-run, draft release, skip R2 upload)'
11-
type: boolean
12-
default: true
138

149
env:
1510
PKG_CACHE_PATH: .pkg
16-
DRY_RUN: ${{ inputs.dry-run || false }}
1711

1812
jobs:
1913
release:
@@ -76,17 +70,17 @@ jobs:
7670
run: ./publish-deb
7771

7872
- name: Publish to npm
79-
run: npm publish --provenance ${{ env.DRY_RUN == 'true' && '--dry-run' || '' }}
73+
if: github.ref_type == 'tag'
74+
run: npm publish --provenance
8075

8176
- name: Create GitHub Release
82-
run: >
83-
gh release create "${GITHUB_REF_NAME}" bin/*.gz --generate-notes
84-
${{ env.DRY_RUN == 'true' && '--draft' || '' }}
77+
if: github.ref_type == 'tag'
78+
run: gh release create "${GITHUB_REF_NAME}" bin/*.gz --generate-notes
8579
env:
8680
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8781

8882
- name: Upload ppa to Cloudflare R2
89-
if: env.DRY_RUN != 'true'
83+
if: github.ref_type == 'tag'
9084
run: rclone copy ppa/ r2:${R2_BUCKET}/
9185
env:
9286
RCLONE_CONFIG_R2_TYPE: s3

0 commit comments

Comments
 (0)