■ ■ ■ ■ ■ ■
.github/workflows/release.yml
1 | 1 | | name: Build release |
2 | 2 | | |
3 | 3 | | on: |
4 | | - | release: |
5 | | - | types: [created, edited, published] |
| 4 | + | workflow_dispatch: |
| 5 | + | inputs: |
| 6 | + | ver: |
| 7 | + | description: 'Tag version for the release' |
| 8 | + | required: true |
6 | 9 | | |
7 | 10 | | jobs: |
8 | 11 | | CI: |
9 | 12 | | runs-on: ubuntu-latest |
10 | 13 | | steps: |
11 | 14 | | - uses: actions/checkout@v2 |
| 15 | + | ref: ${{ github.event.inputs.ver }} |
12 | 16 | | |
13 | 17 | | - name: Set up Go |
14 | 18 | | uses: actions/setup-go@v2 |
| skipped 7 lines |
22 | 26 | | if: startsWith(github.ref, 'refs/tags/') |
23 | 27 | | env: |
24 | 28 | | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
25 | | - | run: gh release upload ${{ github.ref }} ./dist/* |
| 29 | + | run: gh release create -d ${{ github.event.inputs.ver }} ./dist/* |
26 | 30 | | |
27 | 31 | | |