Skip to content

add: comprehensive testing strategy for all file types #14

add: comprehensive testing strategy for all file types

add: comprehensive testing strategy for all file types #14

Workflow file for this run

name: Publish Release
on:
pull_request:
types: [closed]
branches: [main]
jobs:
publish:
runs-on: ubuntu-latest
# Only run if PR was merged and has a release label
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'release')
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get version from package.json
id: version
run: |
VERSION=$(npm pkg get version | tr -d '"')
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Create and push tag
run: |
VERSION="${{ steps.version.outputs.version }}"
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action"
git tag -a $VERSION -m "Release $VERSION"
git push origin $VERSION
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
VERSION="${{ steps.version.outputs.version }}"
gh release create $VERSION \
--title "Release $VERSION" \
--generate-notes \
--latest