Skip to content

Commit

Permalink
ci: update github-actions across the board
Browse files Browse the repository at this point in the history
checkout, upload-artifact, download-artifact, setup-python, setup-java,
codeql-action, upload-pages-artifact, deploy-pages, setup-emsdk
  • Loading branch information
axxel committed Feb 20, 2024
1 parent df191aa commit 1af4b87
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 42 deletions.
30 changes: 15 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ jobs:

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup Python 3
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.x'

Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
build-ubuntu-sanitize:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{github.ref}}

Expand All @@ -82,7 +82,7 @@ jobs:
build-ios:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{github.ref}}

Expand All @@ -99,8 +99,8 @@ jobs:
build-android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
Expand All @@ -109,7 +109,7 @@ jobs:
working-directory: wrappers/android
run: ./gradlew assembleDebug # build only the debug version of the aar (faster build)

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: android-artifacts
path: "wrappers/android/zxingcpp/build/outputs/aar/zxingcpp-debug.aar"
Expand Down Expand Up @@ -161,10 +161,10 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -189,7 +189,7 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Lint
working-directory: wrappers/rust
Expand All @@ -213,8 +213,8 @@ jobs:
build-wasm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: mymindstorm/setup-emsdk@v12
- uses: actions/checkout@v4
- uses: mymindstorm/setup-emsdk@v14

- name: Configure
run: emcmake cmake -Swrappers/wasm -Bbuild
Expand All @@ -225,7 +225,7 @@ jobs:
# - name: Test
# run: node build/EmGlueTests.js

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: wasm-artifacts
path: |
Expand All @@ -236,7 +236,7 @@ jobs:
runs-on: windows-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Configure
shell: cmd # powershell messes up the arguments containing a '.' ?!?
Expand All @@ -249,7 +249,7 @@ jobs:
- name: Build
run: cmake --build build -j8 --config Release

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: winrt-ARM64-artifacts
path: build/dist
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -52,7 +52,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -66,6 +66,6 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
8 changes: 4 additions & 4 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup EMSDK
uses: mymindstorm/setup-emsdk@v12
uses: mymindstorm/setup-emsdk@v14

- name: Configure
run: emcmake cmake -Swrappers/wasm -Bbuild
Expand All @@ -47,10 +47,10 @@ jobs:
mv build/zxing_* build/*.html pages
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
uses: actions/upload-pages-artifact@v3
with:
path: 'pages'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v4
6 changes: 3 additions & 3 deletions .github/workflows/msvc-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Configure CMake
run: cmake -B ${{ env.build }} -DCMAKE_BUILD_TYPE=${{ env.config }}
Expand All @@ -60,13 +60,13 @@ jobs:

# Upload SARIF file to GitHub Code Scanning Alerts
- name: Upload SARIF to GitHub
uses: github/codeql-action/upload-sarif@v2
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: ${{ steps.run-analysis.outputs.sarif }}

# Upload SARIF file as an Artifact to download and view
# - name: Upload SARIF as an Artifact
# uses: actions/upload-artifact@v3
# uses: actions/upload-artifact@v4
# with:
# name: sarif-file
# path: ${{ steps.run-analysis.outputs.sarif }}
4 changes: 2 additions & 2 deletions .github/workflows/publish-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/publish-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.12'

Expand All @@ -45,20 +45,20 @@ jobs:
CIBW_ARCHS_MACOS: universal2
CIBW_ENVIRONMENT_MACOS: CMAKE_OSX_ARCHITECTURES="arm64;x86_64"

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl

build-sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.12'

Expand All @@ -70,7 +70,7 @@ jobs:
working-directory: wrappers/python
run: python3 setup.py sdist

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
path: wrappers/python/dist/*.tar.gz

Expand All @@ -87,7 +87,7 @@ jobs:
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
if: github.event_name == 'release' || github.event.inputs.publish == 'y'
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: artifact
path: dist
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/publish-winrt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
target: [Win32, x64, ARM, ARM64]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Create build environment
shell: cmd
Expand All @@ -39,7 +39,7 @@ jobs:
working-directory: ${{runner.workspace}}/build
run: cmake --build . -j8 --config Release

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: winrt-${{matrix.target}}-artifacts
path: ${{runner.workspace}}/build/dist
Expand All @@ -49,16 +49,16 @@ jobs:
runs-on: windows-latest
if: ${{ github.event_name == 'release' || github.event.inputs.publish == 'y' }}
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: winrt-Win32-artifacts
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: winrt-x64-artifacts
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: winrt-ARM-artifacts
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: winrt-ARM64-artifacts

Expand All @@ -78,7 +78,7 @@ jobs:
shell: cmd
run: nuget push huycn.zxingcpp.winrt.nupkg -ApiKey ${{ secrets.NUGET_API_KEY }} -Source https://api.nuget.org/v3/index.json

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: nuget-package
path: huycn.zxingcpp.winrt.nupkg
Expand Down

0 comments on commit 1af4b87

Please sign in to comment.