mirror of
https://github.com/Paillat-dev/svelte-github-calendar.git
synced 2026-03-02 18:34:56 +00:00
🚀 Add prerelease tag handling and update Node.js/pnpm versions in workflows.
This commit is contained in:
16
.github/workflows/publish.yaml
vendored
16
.github/workflows/publish.yaml
vendored
@@ -35,6 +35,15 @@ jobs:
|
||||
VERSION=${GITHUB_REF#refs/tags/v}
|
||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||
echo "Publishing version: $VERSION"
|
||||
|
||||
if [[ $VERSION =~ - ]]; then
|
||||
TAG=$(echo $VERSION | sed -E 's/.*-([^.]+).*/\1/')
|
||||
echo "tag=$TAG" >> $GITHUB_OUTPUT
|
||||
echo "Prerelease detected, using tag: $TAG"
|
||||
else
|
||||
echo "tag=latest" >> $GITHUB_OUTPUT
|
||||
echo "Stable release, using tag: latest"
|
||||
fi
|
||||
|
||||
- name: Update package.json version
|
||||
run: |
|
||||
@@ -43,10 +52,5 @@ jobs:
|
||||
- name: Build package
|
||||
run: pnpm build
|
||||
|
||||
- name: Set publishing auth config
|
||||
run: pnpm config set '//registry.npmjs.org/:_authToken' "${NODE_AUTH_TOKEN}"
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
||||
|
||||
- name: Publish to NPM
|
||||
run: pnpm publish --access public --provenance --no-git-checks
|
||||
run: pnpm publish --access public --provenance --no-git-checks --tag ${{ steps.version.outputs.tag }}
|
||||
4
.github/workflows/quality.yaml
vendored
4
.github/workflows/quality.yaml
vendored
@@ -31,12 +31,12 @@ jobs:
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: 9
|
||||
version: 10
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
node-version: '24'
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Install dependencies
|
||||
|
||||
Reference in New Issue
Block a user