Skip to content
This repository was archived by the owner on Jan 29, 2026. It is now read-only.

Commit 68af9c8

Browse files
mingxwatian-lt
andauthored
Fix release pipeline (#203)
Co-authored-by: Tian L. <60599517+tian-lt@users.noreply.github.com>
1 parent 0b075c7 commit 68af9c8

1 file changed

Lines changed: 22 additions & 67 deletions

File tree

.github/workflows/pipeline-release.yml

Lines changed: 22 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -9,102 +9,57 @@ on:
99
default: '0.0.0'
1010

1111
jobs:
12-
prepare-release:
13-
runs-on: windows-latest
14-
steps:
15-
- uses: actions/checkout@v3
16-
17-
- name: create release branch
18-
run: |
19-
git checkout -b release/${{ github.event.inputs.version }}
20-
21-
- name: assign cmake version
22-
run: "((Get-Content -Path CMakeLists.txt -Raw) -Replace 'VERSION 0.1.0 # local build version','VERSION ${{ github.event.inputs.version }}') | Set-Content -Path CMakeLists.txt -NoNewLine"
23-
24-
- name: commit changes
25-
run: |
26-
git config --local user.email "release-bot@no.email.com"
27-
git config --local user.name "release bot"
28-
git add CMakeLists.txt
29-
git commit -m 'assign a release version'
30-
31-
- name: new git tag
32-
run: |
33-
git tag ${{ github.event.inputs.version }}
34-
35-
- name: push git objects
36-
run: |
37-
git push origin release/${{ github.event.inputs.version }}
38-
git push origin ${{ github.event.inputs.version }}
39-
4012
run-bvt-gcc:
41-
needs: prepare-release
4213
name: Run BVT with GCC
4314
uses: ./.github/workflows/bvt-gcc.yml
44-
with:
45-
branch: release/${{ github.event.inputs.version }}
4615

4716
run-bvt-clang:
48-
needs: prepare-release
4917
name: Run BVT with Clang
5018
uses: ./.github/workflows/bvt-clang.yml
51-
with:
52-
branch: release/${{ github.event.inputs.version }}
5319

5420
run-bvt-msvc:
55-
needs: prepare-release
5621
name: Run BVT with MSVC
5722
uses: ./.github/workflows/bvt-msvc.yml
58-
with:
59-
branch: release/${{ github.event.inputs.version }}
6023

6124
run-bvt-appleclang:
62-
needs: prepare-release
6325
name: Run BVT with AppleClang
6426
uses: ./.github/workflows/bvt-appleclang.yml
65-
with:
66-
branch: release/${{ github.event.inputs.version }}
6727

6828
run-bvt-nvhpc:
69-
needs: prepare-release
7029
name: Run BVT with NVHPC
7130
uses: ./.github/workflows/bvt-nvhpc.yml
72-
with:
73-
branch: release/${{ github.event.inputs.version }}
7431

7532
report:
7633
uses: ./.github/workflows/bvt-report.yml
7734
name: Generate report
7835
needs: [run-bvt-gcc, run-bvt-clang, run-bvt-msvc, run-bvt-appleclang, run-bvt-nvhpc]
7936

8037
draft-release:
81-
runs-on: windows-latest
38+
name: Draft release
39+
runs-on: ubuntu-24.04
8240
needs: report
8341
steps:
84-
- uses: actions/checkout@v3
85-
with:
86-
ref: release/${{ github.event.inputs.version }}
42+
- uses: actions/checkout@v4
8743

88-
- name: create zip archive
89-
run: Compress-Archive -Path ".\proxy.h" -DestinationPath ".\proxy-${{ github.event.inputs.version }}.zip"
44+
- name: create tag
45+
run: |
46+
git checkout -b release/${{ github.event.inputs.version }}
47+
sed -i 's/VERSION 0\.1\.0 # local build version/VERSION ${{ github.event.inputs.version }}/' CMakeLists.txt
48+
git config --local user.email "release-bot@no.email.com"
49+
git config --local user.name "release bot"
50+
git add CMakeLists.txt
51+
git commit -m "Release version ${{ github.event.inputs.version }}"
52+
git tag ${{ github.event.inputs.version }}
53+
git push origin ${{ github.event.inputs.version }}
9054
91-
- uses: actions/create-release@v1
92-
name: create release draft
93-
id: release_draft
94-
env:
95-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
96-
with:
97-
tag_name: ${{ github.event.inputs.version }}
98-
release_name: Proxy ${{ github.event.inputs.version }} Release
99-
draft: true
100-
prerelease: true
55+
- name: create tgz archive
56+
run: tar -czf "proxy-${{ github.event.inputs.version }}.tgz" "proxy.h"
10157

102-
- name: upload artifacts
103-
uses: actions/upload-release-asset@v1
104-
env:
105-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58+
- name: create release draft
59+
uses: softprops/action-gh-release@v2
10660
with:
107-
upload_url: ${{ steps.release_draft.outputs.upload_url }}
108-
asset_path: ./proxy-${{ github.event.inputs.version }}.zip
109-
asset_name: proxy-${{ github.event.inputs.version }}.zip
110-
asset_content_type: application/zip
61+
draft: true
62+
files: proxy-${{ github.event.inputs.version }}.tgz
63+
name: Proxy ${{ github.event.inputs.version }} Release
64+
tag_name: ${{ github.event.inputs.version }}
65+
generate_release_notes: true

0 commit comments

Comments
 (0)