Skip to content

Commit

Permalink
chore: add workflow for updating bpkg (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
LucianBuzzo authored Feb 21, 2024
1 parent 87a628f commit d294232
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/bpkg-version-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Update bpkg.json Version

on:
push:
tags:
- "v*.*.*"
workflow_dispatch:

jobs:
update-version:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Extract version from tag
id: get_version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV

- name: Update bpkg.json
uses: mikefarah/yq@v4
with:
cmd: yq eval '.version = strenv(VERSION)' -i bpkg.json

- name: Commit and push changes
run: |
git config --global user.name 'github-actions'
git config --global user.email '[email protected]'
git add bpkg.json
git commit -m "Update bpkg.json version to ${{ env.VERSION }}"
git push

0 comments on commit d294232

Please sign in to comment.