Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
e3310a4ab2 | |||
5516a6f9c5 | |||
4119a1fc7f | |||
34da92fc31 | |||
651dd2c2a0 |
@ -12,30 +12,36 @@ jobs:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Enable Corepack
|
||||
run: corepack enable
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
registry-url: 'https://registry.npmjs.org/'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: Install dependencies with Yarn
|
||||
run: yarn install --immutable
|
||||
|
||||
- name: Run type check
|
||||
run: npm run type-check
|
||||
run: yarn type-check
|
||||
|
||||
- name: Build library
|
||||
run: npm run build
|
||||
run: yarn build
|
||||
|
||||
- name: Determine npm tag
|
||||
- name: Determine npm tag based on release type
|
||||
id: determine_tag
|
||||
run: |
|
||||
IS_PRERELEASE=${{ github.event.release.prerelease }}
|
||||
VERSION=$(node -p "require('./package.json').version")
|
||||
if [[ "$VERSION" =~ -(alpha|beta|rc|dev) ]]; then
|
||||
# Access the prerelease flag from the Gitea release event payload
|
||||
# ${{ github.event.release.prerelease }} is the standard GitHub Actions syntax
|
||||
# Gitea Actions aims for compatibility, so this should work.
|
||||
if [[ "${{ github.event.release.prerelease }}" == "true" ]]; then
|
||||
echo "NPM_TAG=dev" >> $GITHUB_OUTPUT
|
||||
echo "::notice::Release is a pre-release. Publishing with 'dev' tag."
|
||||
else
|
||||
echo "NPM_TAG=latest" >> $GITHUB_OUTPUT
|
||||
echo "::notice::Release is stable. Publishing with 'latest' tag."
|
||||
fi
|
||||
|
||||
- name: Publish to npm
|
||||
|
@ -15,7 +15,7 @@
|
||||
},
|
||||
"private": false,
|
||||
"license": "MIT",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"description": "Vue 3 Composition API implementation for OpenHarbor data management.",
|
||||
"type": "module",
|
||||
"main": "./dist/vue-openharbor-data.umd.cjs",
|
||||
|
Loading…
Reference in New Issue
Block a user