Skip to content

Commit 766b40e

Browse files
authored
Auto-advance date of the next tag (#2428)
Removes softprops/action-gh-release in favor of the `gh` CLI. Fixes #2068 Closes #2425
1 parent 87a0e12 commit 766b40e

File tree

1 file changed

+22
-9
lines changed

1 file changed

+22
-9
lines changed

.github/workflows/publish_next_web-features.yml

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,20 +68,33 @@ jobs:
6868
VERSION: ${{ steps.version.outputs.VERSION }}
6969
TIMESTAMP: ${{ steps.timestamp_and_hash.outputs.TIMESTAMP }}
7070
SHORT_HASH: ${{ steps.timestamp_and_hash.outputs.SHORT_HASH }}
71-
- run: npm publish --tag ${{ env.dist_tag }}
71+
- if: ${{ env.NODE_AUTH_TOKEN }}
72+
run: npm publish --tag ${{ env.dist_tag }}
7273
working-directory: ${{ env.package_dir }}
7374
env:
7475
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
7576

77+
- name: Remove the existing pre-release
78+
run: gh release delete "$TAG" --cleanup-tag --yes || true
79+
env:
80+
GH_TOKEN: ${{ github.token }}
81+
TAG: ${{ env.dist_tag }}
82+
7683
- name: Publish pre-release on GitHub
77-
uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 #v2.0.8
78-
with:
79-
files: |
84+
run: >
85+
gh release create
86+
--title "$PACKAGE@$TAG"
87+
--notes "$NOTES"
88+
--prerelease
89+
--latest=false
90+
"$TAG"
91+
$ARTIFACTS
92+
env:
93+
GH_TOKEN: ${{ github.token }}
94+
PACKAGE: ${{ env.package }}
95+
TAG: ${{ env.dist_tag }}
96+
NOTES: This is a continuously-updated prerelease generated from `main` (currently at ${{ steps.timestamp_and_hash.outputs.SHORT_HASH }}).
97+
ARTIFACTS: >
8098
schemas/data.schema.json
8199
${{ env.package_dir }}/data.json
82100
data.extended.json
83-
prerelease: true
84-
name: web-features@next
85-
body: This is a continuously-updated prerelease generated from `main` (currently at ${{ steps.timestamp_and_hash.outputs.SHORT_HASH }}).
86-
tag_name: ${{ env.dist_tag }}
87-
fail_on_unmatched_files: true

0 commit comments

Comments
 (0)