-
Notifications
You must be signed in to change notification settings - Fork 36
40 lines (40 loc) · 1.24 KB
/
Copy pathrelease.yml
File metadata and controls
40 lines (40 loc) · 1.24 KB
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
name: Release
run-name: Release
on:
workflow_dispatch:
jobs:
Build:
uses: ./.github/workflows/ci.yml
Make-Release:
permissions:
contents: write
runs-on: ubuntu-latest
needs: Build
steps:
- name: Check out repository code
uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: recursive
- name: Get product version
run: |
echo "prod_version=$(cat version.txt)" >> $GITHUB_ENV
- name: Download Artifact
uses: actions/download-artifact@v4
with:
path: ${{ github.workspace }}/dist
- name: Reorganize files
run: |
mv dist/*/*.tar.gz dist/
rm -rf dist/*/
- name: Make a tag
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
git tag -a '${{ env.prod_version }}' -m '${{ env.prod_version }}'
git push origin '${{ env.prod_version }}'
- name: Make a release
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
gh release create --title 'v${{ env.prod_version }}' --notes '' --verify-tag '${{ env.prod_version }}' dist/*.tar.gz