Skip to content

Commit

Permalink
Add bump action
Browse files Browse the repository at this point in the history
Signed-off-by: Dimitris Zervas <[email protected]>
  • Loading branch information
dzervas committed Jan 7, 2024
1 parent 28fe2bc commit 4bce5c0
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 1 deletion.
62 changes: 62 additions & 0 deletions .github/workflows/bump.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---

name: Version bump and release
on:
workflow_dispatch:
inputs:
level:
type: choice
description: "Version bump level"
required: true
options:
- major
- minor
- patch
default: patch

jobs:
bump:
runs-on: ubuntu-latest
permissions:
contents: write
outputs:
version: ${{ steps.semver.outputs.new_version }}
steps:
- uses: actions/checkout@v3

- name: Find last version
id: get-version
run: echo "version=$(jq --raw-output '.version' plugin.json)" >> $GITHUB_OUTPUT

- uses: actions-ecosystem/action-bump-semver@v1
id: semver
with:
current_version: ${{ steps.get-version.outputs.version }}
level: ${{ github.event.inputs.level }}

- name: Bump setup.py version
run: |
jq '.version = "1.1.1"' plugin.json > plugin.json.tmp
mv plugin.json.tmp plugin.json
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
branch: main
commit_message: Bump version to ${{ steps.semver.outputs.new_version }}
tagging_message: "v${{ steps.semver.outputs.new_version }}"

release:
runs-on: ubuntu-latest
needs: bump
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Create release
uses: softprops/action-gh-release@v1
with:
tag_name: "v${{ needs.bump.outputs.version }}"
name: "Frinja v${{ needs.bump.outputs.version }}"
files: dist/*
body: Install from Binary Ninja's plugin manager
2 changes: 1 addition & 1 deletion plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
"Jinja2"
]
},
"version": "1.0",
"version": "1.0.0",
"minimumbinaryninjaversion": 3164
}

0 comments on commit 4bce5c0

Please sign in to comment.