File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change 44 push :
55 tags : [ 'v*' ]
66 workflow_dispatch :
7+ inputs :
8+ version :
9+ description : ' Version to release (e.g., 1.0.0)'
10+ required : true
11+ type : string
712
813permissions :
914 contents : write
1520 - name : Set repo name
1621 run : |
1722 echo "REPO_NAME=$(echo ${{ github.repository }} | cut -d'/' -f2)" >> $GITHUB_ENV
18- echo "VERSION=$(echo ${{ github.ref }} | cut -d'/' -f3 | cut -c2-)" >> $GITHUB_ENV
23+ if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
24+ echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
25+ else
26+ echo "VERSION=$(echo ${{ github.ref }} | cut -d'/' -f3 | cut -c2-)" >> $GITHUB_ENV
27+ fi
1928 - uses : actions/checkout@v4
2029
2130 - name : Set up Lua
4958 - name : Set repo name
5059 run : |
5160 echo "REPO_NAME=$(echo ${{ github.repository }} | cut -d'/' -f2)" >> $GITHUB_ENV
52- echo "VERSION=$(echo ${{ github.ref }} | cut -d'/' -f3 | cut -c2-)" >> $GITHUB_ENV
61+ if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
62+ echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
63+ else
64+ echo "VERSION=$(echo ${{ github.ref }} | cut -d'/' -f3 | cut -c2-)" >> $GITHUB_ENV
65+ fi
5366 - name : Checkout code
5467 uses : actions/checkout@v4
5568 - name : Download JSON file
You can’t perform that action at this time.
0 commit comments