Skip to content

chore(release): 0.4.7 (#449) #13

chore(release): 0.4.7 (#449)

chore(release): 0.4.7 (#449) #13

Workflow file for this run

name: Release PR
on:
push:
branches:
- main
jobs:
version-bump:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure Git
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email '[email protected]'
- name: Check Commit Message
id: check_commit
run: |
commit_message=$(git log -1 --pretty=%B)
if [[ "$commit_message" =~ ^chore\(release\):\ ([.0-9]+).* ]]; then
version="${BASH_REMATCH[1]}"
echo "is_release=true" >> $GITHUB_OUTPUT
echo "version=$version" >> $GITHUB_OUTPUT
else
echo "is_release=false" >> $GITHUB_OUTPUT
fi
- uses: oven-sh/setup-bun@v2
- name: generate changelog and bump version
if: steps.check_commit.outputs.is_release == 'false'
run: bunx standard-version
- name: Create Pull Request
if: steps.check_commit.outputs.is_release == 'false'
uses: peter-evans/create-pull-request@v6
with:
title: "Pending Release"
body: "Automated version bump using standard-version"
branch: version-bump
delete-branch: true
base: main
- name: tag current package version and push
if: steps.check_commit.outputs.is_release == 'true'
run: |
git tag v${{ steps.check_commit.outputs.version }}
git push --tags
bun install --frozen-lockfile
bun run package
bun run ovsx publish *.vsix --pat ${{ secrets.OPEN_VSX_TOKEN }}
bun run vsce publish -p ${{ secrets.VS_MARKETPLACE_TOKEN }}
- name: Release
if: steps.check_commit.outputs.is_release == 'true'
uses: softprops/action-gh-release@v2
with:
files: nix-ide*.vsix
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}