Skip to content

feat: example app layout #35

feat: example app layout

feat: example app layout #35

Workflow file for this run

name: Publish
on:
push:
branches:
- main
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write # The OIDC ID token is used for authentication with JSR.
steps:
- uses: actions/checkout@v4
- name: Publish with JSR
id: publish_jsr
run: npx jsr publish
tag_and_release:
runs-on: ubuntu-latest
needs: publish
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '14' # or any version your project requires
- name: Install dependencies
run: npm install
- name: Get version from jsr.json
id: get_version
run: |
VERSION=$(jq -r '.version' ./jsr.json)
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Configure Git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Create Git tag
env:
VERSION: ${{ env.VERSION }}
GH_PAT: ${{ secrets.GH_PAT }}
run: |
git tag -a "v$VERSION" -m "Release version $VERSION"
git push https://x-access-token:${GH_PAT}@github.com/johnchourajr/buen-type.git "v$VERSION"