Skip to content

Update package.json #13

Update package.json

Update package.json #13

Workflow file for this run

name: Create Release
on:
pull_request:
branches: [ main ]
types: [ closed ]
permissions:
contents: write
jobs:
build:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: 'Setup jq'
uses: dcarbone/[email protected]
- name: Extract and update version
id: trim
run: |
unoversion=$(jq .devDependencies.unocss package.json -r)
echo "value=${unoversion#^}" >> "$GITHUB_OUTPUT"
jq --arg unoversion "${unoversion#^}" '.version = "$unoversion"' package.json > package.json
- uses: actions4git/setup-git@v1
- run: |
git add package.json
git tag --force v${{ steps.trim.outputs.value }}
git commit --message 'v${{ steps.trim.outputs.value }}'
git push origin main --force
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ steps.trim.outputs.value }}
release_name: Release v${{ steps.trim.outputs.value }}
body: |
Changes in this Release
- Unocss bumped to ${{ steps.trim.outputs.value }}
draft: false
prerelease: false