Skip to content

Commit 8ba6549

Browse files
committed
Add dump workflow to bump version
1 parent 068b0fe commit 8ba6549

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/dump.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Dump
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: "Version (e.g., 1.2.3)"
8+
type: string
9+
required: true
10+
11+
jobs:
12+
tag:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout Repository
16+
uses: actions/checkout@v4
17+
env:
18+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Update Version
23+
run: |
24+
sed -i 's/^version = \".*\"/version = \"${{ github.event.inputs.version }}\"/' Cargo.toml
25+
sed -i 's/^version = \".*\"/version = \"${{ github.event.inputs.version }}\"/' extension.toml
26+
27+
- name: Add And Commit
28+
uses: EndBug/add-and-commit@v9
29+
with:
30+
committer_name: GitHub Actions
31+
committer_email: [email protected]
32+
add: '["Cargo.toml", "extension.toml"]'
33+
message: "Dump Version to v${{ github.event.inputs.version }}"
34+
tag: v${{ github.event.inputs.version }}
35+
36+
- name: Create Release Assets
37+
uses: actions/create-release@v1
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
with:
41+
tag_name: v${{ github.event.inputs.version }}
42+
release_name: v${{ github.event.inputs.version }}
43+
draft: false
44+
prerelease: false

0 commit comments

Comments
 (0)