Skip to content

Update dependency vite to v6.0.6 (#101) #98

Update dependency vite to v6.0.6 (#101)

Update dependency vite to v6.0.6 (#101) #98

Workflow file for this run

name: tagpr
on:
push:
branches: ["main"]
jobs:
tagpr:
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.tagpr.outputs.tag }}
permissions:
contents: write
issues: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: 'npm'
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: 1053852
private-key: ${{ secrets.AINOYA_BOT_PRIVATE_KEY }}
- name: Get GitHub App User ID
id: get-user-id
run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
- run: |
git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]'
git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com>'
- name: increment chrome extnsion manifest.json version
run: |
CURRENT_VERSION=$(jq -r '.version' public/manifest.json)
NEW_VERSION=$(echo $CURRENT_VERSION | awk -F. '{if (NF==1) {$1+=1} else {$NF+=1}; OFS="."; print $0}' | sed 's/ /./g')
jq --arg new_version $NEW_VERSION '.version = $new_version' public/manifest.json > public/manifest.json.tmp
mv public/manifest.json.tmp public/manifest.json
- name: npm install
run: npm install
- name: biome check fix
run: npm run check -- --fix
- uses: Songmu/tagpr@v1
id: tagpr
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
# run job to upload artifact if git tagged
upload:
runs-on: ubuntu-latest
needs: tagpr
if: needs.tagpr.outputs.tag != ''
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: 'npm'
- name: Install dependencies
run: npm install
- name: Build
run: |
npm run build
zip -r dist.zip dist
- name: Upload artifact
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ needs.tagpr.outputs.tag }}
files: |
dist.zip