forked from c3r34lk1ll3r/BinRida
-
Notifications
You must be signed in to change notification settings - Fork 3
62 lines (55 loc) · 1.71 KB
/
bump.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
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@v4
- 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 plugin.json version
run: |
jq ".version = \"${{ steps.semver.outputs.new_version }}\" | .longdescription = \"$(cat README.md)\"" 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