Skip to content

Commit f91b456

Browse files
committed
update to latest actions
1 parent 43442d2 commit f91b456

1 file changed

Lines changed: 23 additions & 13 deletions

File tree

.github/workflows/build.yml

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,39 +9,42 @@ on:
99
branches: [main]
1010
workflow_dispatch:
1111

12+
permissions:
13+
contents: read
14+
1215
jobs:
1316
windows:
1417
runs-on: windows-latest
1518
steps:
16-
- uses: actions/checkout@v4
19+
- uses: actions/checkout@v6.0.1
1720
- name: Build
1821
run: |
1922
cmake -B ${{github.workspace}}/build -A x64
2023
cmake --build ${{github.workspace}}/build --config Release
2124
- name: Upload windows build
22-
uses: actions/upload-artifact@v4
25+
uses: actions/upload-artifact@v6.0.0
2326
with:
2427
name: windows
2528
path: ${{github.workspace}}/build/Analyzers/Release/*.dll
2629
macos:
2730
runs-on: macos-latest
2831
steps:
29-
- uses: actions/checkout@v4
32+
- uses: actions/checkout@v6.0.1
3033
- name: Build
3134
run: |
3235
cmake -B ${{github.workspace}}/build/x86_64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES=x86_64
3336
cmake --build ${{github.workspace}}/build/x86_64
3437
cmake -B ${{github.workspace}}/build/arm64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES=arm64
3538
cmake --build ${{github.workspace}}/build/arm64
3639
- name: Upload MacOS x86_64 build
37-
uses: actions/upload-artifact@v4
40+
uses: actions/upload-artifact@v6.0.0
3841
with:
3942
name: macos_x86_64
4043
path: |
4144
${{github.workspace}}/build/x86_64/Analyzers/*.so
4245
${{github.workspace}}/build/x86_64/Analyzers/*.dylib
4346
- name: Upload MacOS arm64 build
44-
uses: actions/upload-artifact@v4
47+
uses: actions/upload-artifact@v6.0.0
4548
with:
4649
name: macos_arm64
4750
path: |
@@ -50,34 +53,41 @@ jobs:
5053
linux:
5154
runs-on: ubuntu-latest
5255
steps:
53-
- uses: actions/checkout@v4
56+
- uses: actions/checkout@v6.0.1
5457
- name: Build
5558
run: |
5659
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release
5760
cmake --build ${{github.workspace}}/build
5861
- name: Upload Linux build
59-
uses: actions/upload-artifact@v4
62+
uses: actions/upload-artifact@v6.0.0
6063
with:
6164
name: linux
6265
path: ${{github.workspace}}/build/Analyzers/*.so
6366
publish:
6467
needs: [windows, macos, linux]
6568
runs-on: ubuntu-latest
69+
permissions:
70+
contents: write
6671
steps:
6772
- name: download individual builds
68-
uses: actions/download-artifact@v4
73+
uses: actions/download-artifact@v8.0.1
6974
with:
7075
path: ${{github.workspace}}/artifacts
7176
- name: zip
7277
run: |
7378
cd ${{github.workspace}}/artifacts
7479
zip -r ${{github.workspace}}/analyzer.zip .
75-
- uses: actions/upload-artifact@v4
80+
- uses: actions/upload-artifact@v6.0.0
7681
with:
7782
name: all-platforms
7883
path: ${{github.workspace}}/artifacts/**
79-
- name: create release
80-
uses: softprops/action-gh-release@v1
84+
- name: create or update release
8185
if: startsWith(github.ref, 'refs/tags/')
82-
with:
83-
files: ${{github.workspace}}/analyzer.zip
86+
run: |
87+
if gh release view "${GITHUB_REF_NAME}" >/dev/null 2>&1; then
88+
gh release upload "${GITHUB_REF_NAME}" "${GITHUB_WORKSPACE}/analyzer.zip" --clobber
89+
else
90+
gh release create "${GITHUB_REF_NAME}" "${GITHUB_WORKSPACE}/analyzer.zip" --generate-notes
91+
fi
92+
env:
93+
GH_TOKEN: ${{ github.token }}

0 commit comments

Comments
 (0)