chore(deps): update dependency @vue/tsconfig to ^0.8.1 #1115
This file contains hidden or 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
name: Publish | |
on: | |
push: | |
branches: | |
- main | |
- alpha | |
- beta | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
- labeled | |
branches: | |
- main | |
- alpha | |
- beta | |
permissions: | |
id-token: write | |
contents: read | |
actions: read | |
jobs: | |
run-tests: | |
name: Tests | |
uses: ./.github/workflows/test.yaml | |
publish: | |
name: Build and Publish | |
needs: | |
- run-tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Remove preview consumption comment | |
if: ${{ github.event_name == 'pull_request' && env.GITHUB_TOKEN != '' }} | |
uses: marocchino/sticky-pull-request-comment@52423e01640425a022ef5fd42c6fb5f633a02728 # v2.9.1 | |
with: | |
header: pr_preview_consumption | |
delete: true | |
GITHUB_TOKEN: ${{ env.GITHUB_TOKEN }} | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.KONGPONENTS_BOT_PAT }} | |
- name: setup git | |
run: | | |
git config user.email "[email protected]" | |
git config user.name "Kong UI Bot" | |
- name: Setup PNPM with Dependencies | |
uses: ./.github/actions/setup-pnpm-with-dependencies/ | |
with: | |
force-install: true | |
- name: Build | |
# Since we lint in the Tests job, we can just build the components here | |
run: pnpm build:components | |
# Since everything was successful, update the src/component-list.ts file to compare | |
# against in future runs. Since this file is modified here in the CI, it is written back | |
# to the repository via the `/package.json` file `@semantic-release/git` => `assets` config | |
- name: Update component-list.ts | |
if: github.event_name == 'push' | |
run: pnpm update-component-list | |
# Since everything was successful, update the Vitest snapshot files to compare | |
# against for future runs. Since the snapshot files are modified here in the CI, they are written back | |
# to the repository via the `/package.json` file `@semantic-release/git` => `assets` config | |
- name: Update test snapshots | |
if: github.event_name == 'push' | |
run: pnpm test --update | |
- name: Publish package preview | |
id: package-preview | |
# Do not run for `alpha` or `beta` branches | |
if: github.event_name == 'pull_request' && (github.actor != 'renovate[bot]' || contains(github.event.pull_request.labels.*.name, 'create preview package')) && !contains(github.head_ref || github.ref_name, 'alpha') && !contains(github.head_ref || github.ref_name, 'beta') | |
run: | | |
git config user.email "[email protected]" | |
git config user.name "Kong UI Bot" | |
preid="pr.${{ github.event.pull_request.number }}.$(git rev-parse --short ${{ github.event.pull_request.head.sha }})" | |
tag="pr-${{ github.event.pull_request.number }}" | |
echo "preid=${preid}" | |
pnpm version prerelease --preid ${preid} --no-git-tag-version --yes --amend | |
package_version=$(jq -r ".version" package.json) | |
package=@kong/icons@"${package_version}" | |
npm show "${package}" >/dev/null 2>&1 && npm_show_status=0 || npm_show_status=1 | |
if [ $npm_show_status -eq 0 ]; then | |
echo "Package ${package} is already published. Skipping publishing." | |
exit 0 | |
fi | |
npm_instructions="" | |
pkg=$(npm publish --no-git-checks --access public --report-summary --tag "${tag}" | grep "+ "| sed 's/+ //') | |
if [[ -z "${pkg}" ]]; then | |
echo "Error publishing package" | |
exit -1 | |
fi | |
npm_instructions="pnpm add @$(echo ${pkg}|cut -d'@' -f2)@${tag}" | |
echo "npm_instructions<<EOF" >> $GITHUB_OUTPUT | |
echo -e "$npm_instructions" >> $GITHUB_OUTPUT | |
echo "EOF" >> $GITHUB_OUTPUT | |
- name: Provide preview link info | |
if: ${{ steps.package-preview.outputs.npm_instructions != '' && env.GITHUB_TOKEN != '' }} | |
uses: marocchino/sticky-pull-request-comment@52423e01640425a022ef5fd42c6fb5f633a02728 # v2.9.1 | |
with: | |
header: pr_preview_consumption | |
message: | | |
### Install the preview package from this PR in your consuming application | |
In your host project, you may install the preview package version generated by this PR: | |
```sh | |
${{ steps.package-preview.outputs.npm_instructions }} | |
``` | |
GITHUB_TOKEN: ${{ env.GITHUB_TOKEN }} | |
- name: Semantic Release | |
if: github.event_name == 'push' | |
uses: cycjimmy/semantic-release-action@0a51e81a6baff2acad3ee88f4121c589c73d0f0e # v4.2.0 | |
env: | |
# Since branch protections are on (pushing commits) you need to use a bot PAT | |
GITHUB_TOKEN: ${{ secrets.KONGPONENTS_BOT_PAT }} | |
# as of now cycjimmy/semantic-release-action is not publishing to npmjs as | |
# trusted publishing is not yet supported, so we want to do a publish as separate step | |
- name: Publish to npm | |
if: github.event_name == 'push' | |
run: | | |
npm publish |