Skip to content

Commit 55da97e

Browse files
committed
integrate release
1 parent 2fa1834 commit 55da97e

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/releases.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Release Package
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: 'Version to release'
8+
required: true
9+
10+
permissions:
11+
contents: write
12+
13+
jobs:
14+
release:
15+
runs-on: ubuntu-24.04
16+
name: Release v${{ inputs.version }}
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
22+
- name: Remove optional "v" prefix
23+
id: version
24+
run: |
25+
echo "version=${VERSION#v}" >> "$GITHUB_OUTPUT"
26+
env:
27+
VERSION: ${{ inputs.version }}
28+
29+
- name: Remove unnecessary files
30+
run: |
31+
find . -maxdepth 1 -not -path "./src" -not -path "./composer.json" -not -path "./LICENSE.md" -not -path "./README.md" -not -path "." -print0 | xargs -0 rm -rf
32+
33+
- name: Git add
34+
run: git add .
35+
36+
- name: Git commit
37+
run: git commit -m "v${{ steps.version.outputs.version }}"
38+
39+
- name: Git tag
40+
run: git tag v${{ steps.version.outputs.version }}
41+
42+
- name: Git push tags
43+
run: git push origin v${{ steps.version.outputs.version }}

0 commit comments

Comments
 (0)