-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2ffd77b
commit 269f100
Showing
4 changed files
with
130 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
name: 'release' | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
release_type: | ||
type: choice | ||
default: auto | ||
description: What kind of version upgrade | ||
options: | ||
- auto | ||
- patch | ||
- minor | ||
- major | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: "0" | ||
submodules: true | ||
|
||
- name: setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
|
||
- uses: oNaiPs/secrets-to-env-action@v1 | ||
with: | ||
secrets: ${{ toJSON(secrets) }} | ||
|
||
|
||
- uses: oleksiyrudenko/gha-git-credentials@v2-latest | ||
with: | ||
token: '${{ secrets.GITHUB_TOKEN }}' | ||
name: Martin Guillon | ||
email: [email protected] | ||
|
||
- name: install jq | ||
run: sudo apt install jq | ||
|
||
- name: Enable CorePack | ||
run: | | ||
corepack enable | ||
yarn config get globalFolder # the yarn command will ensure the correct yarn version is downloaded and installed | ||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn config get globalFolder)" | ||
|
||
- name: Remove package.json resolutions | ||
run: echo "`jq 'delpaths([["resolutions"]])' package.json`" > package.json | ||
|
||
- uses: actions/cache@v4 | ||
name: Handle node_modules Cache | ||
id: yarn-node_modules # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-yarn-node_modules-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-node_modules- | ||
- uses: actions/cache@v4 | ||
if: steps.yarn-node_modules.outputs.cache-hit != 'true' | ||
name: Handle Yarn cache | ||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-cache-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Install deps | ||
if: steps.yarn-node_modules.outputs.cache-hit != 'true' | ||
uses: bahmutov/npm-install@v1 | ||
with: | ||
install-command: yarn install --silent | ||
env: | ||
YARN_ENABLE_IMMUTABLE_INSTALLS: false | ||
|
||
- name: run setup | ||
run: | | ||
npm run setup | ||
- name: "NPM Identity" | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: | | ||
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc | ||
- name: publish auto | ||
if: github.event.inputs.release_type == 'auto' | ||
run: | | ||
npm run publish -- --force-publish --no-verify-access --no-private --no-commit-hooks --yes | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: publish | ||
if: github.event.inputs.release_type != 'auto' | ||
run: | | ||
npm run publish -- --force-publish --no-verify-access --no-private --no-commit-hooks --yes --bump ${{ github.event.inputs.release_type }} | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"compilerOptions": { | ||
"composite": true, | ||
"paths": { | ||
"nativescript-vue": ["./node_modules/nativescript-vue3"] | ||
} | ||
}, | ||
"include": [ | ||
"./demo-snippets/vue3" | ||
] | ||
} |