mirror of
https://github.com/Paillat-dev/svelte-github-calendar.git
synced 2026-03-03 02:44:55 +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
@@ -36,6 +36,15 @@ jobs:
|
|||||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||||
echo "Publishing version: $VERSION"
|
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
|
- name: Update package.json version
|
||||||
run: |
|
run: |
|
||||||
pnpm version ${{ steps.version.outputs.version }} --no-git-tag-version
|
pnpm version ${{ steps.version.outputs.version }} --no-git-tag-version
|
||||||
@@ -43,10 +52,5 @@ jobs:
|
|||||||
- name: Build package
|
- name: Build package
|
||||||
run: pnpm build
|
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
|
- 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
|
- name: Setup pnpm
|
||||||
uses: pnpm/action-setup@v4
|
uses: pnpm/action-setup@v4
|
||||||
with:
|
with:
|
||||||
version: 9
|
version: 10
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: '20'
|
node-version: '24'
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
|
|||||||
Reference in New Issue
Block a user