|
9 | 9 | default: '0.0.0' |
10 | 10 |
|
11 | 11 | 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 | | -
|
40 | 12 | run-bvt-gcc: |
41 | | - needs: prepare-release |
42 | 13 | name: Run BVT with GCC |
43 | 14 | uses: ./.github/workflows/bvt-gcc.yml |
44 | | - with: |
45 | | - branch: release/${{ github.event.inputs.version }} |
46 | 15 |
|
47 | 16 | run-bvt-clang: |
48 | | - needs: prepare-release |
49 | 17 | name: Run BVT with Clang |
50 | 18 | uses: ./.github/workflows/bvt-clang.yml |
51 | | - with: |
52 | | - branch: release/${{ github.event.inputs.version }} |
53 | 19 |
|
54 | 20 | run-bvt-msvc: |
55 | | - needs: prepare-release |
56 | 21 | name: Run BVT with MSVC |
57 | 22 | uses: ./.github/workflows/bvt-msvc.yml |
58 | | - with: |
59 | | - branch: release/${{ github.event.inputs.version }} |
60 | 23 |
|
61 | 24 | run-bvt-appleclang: |
62 | | - needs: prepare-release |
63 | 25 | name: Run BVT with AppleClang |
64 | 26 | uses: ./.github/workflows/bvt-appleclang.yml |
65 | | - with: |
66 | | - branch: release/${{ github.event.inputs.version }} |
67 | 27 |
|
68 | 28 | run-bvt-nvhpc: |
69 | | - needs: prepare-release |
70 | 29 | name: Run BVT with NVHPC |
71 | 30 | uses: ./.github/workflows/bvt-nvhpc.yml |
72 | | - with: |
73 | | - branch: release/${{ github.event.inputs.version }} |
74 | 31 |
|
75 | 32 | report: |
76 | 33 | uses: ./.github/workflows/bvt-report.yml |
77 | 34 | name: Generate report |
78 | 35 | needs: [run-bvt-gcc, run-bvt-clang, run-bvt-msvc, run-bvt-appleclang, run-bvt-nvhpc] |
79 | 36 |
|
80 | 37 | draft-release: |
81 | | - runs-on: windows-latest |
| 38 | + name: Draft release |
| 39 | + runs-on: ubuntu-24.04 |
82 | 40 | needs: report |
83 | 41 | steps: |
84 | | - - uses: actions/checkout@v3 |
85 | | - with: |
86 | | - ref: release/${{ github.event.inputs.version }} |
| 42 | + - uses: actions/checkout@v4 |
87 | 43 |
|
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 }} |
90 | 54 |
|
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" |
101 | 57 |
|
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 |
106 | 60 | 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