Skip to content

Commit

Permalink
Update workflow actions (#4685)
Browse files Browse the repository at this point in the history
* Update workflow actions, trigger builds on workflow update

* Fix artifact naming
  • Loading branch information
ranisalt authored May 18, 2024
1 parent 848d64f commit 78504af
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 21 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/build-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ on:
- v*

paths:
- .github/workflows/build-ubuntu.yml
- cmake/**
- src/**
- CMakeLists.txt
- CMakePresets.json

pull_request:
paths:
- .github/workflows/build-ubuntu.yml
- cmake/**
- src/**
- CMakeLists.txt
Expand All @@ -36,10 +38,10 @@ jobs:
luajit: [on, off]

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

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: cpp
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
Expand All @@ -65,13 +67,13 @@ jobs:
configurePreset: default

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
with:
category: "/language:cpp"
if: ${{ matrix.buildtype }} == "Debug"

- name: Upload artifact binary
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ubuntu-tfs-amd64-${{ github.sha }}
name: tfs-ubuntu-${{ matrix.buildtype }}-luajit=on-${{ github.sha }}
path: ${{ runner.workspace }}/build/tfs
16 changes: 9 additions & 7 deletions .github/workflows/build-vcpkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
- v*

paths:
- .github/workflows/build-vcpkg.yml
- cmake/**
- src/**
- CMakeLists.txt
Expand All @@ -15,6 +16,7 @@ on:

pull_request:
paths:
- .github/workflows/build-vcpkg.yml
- cmake/**
- src/**
- CMakeLists.txt
Expand All @@ -35,7 +37,7 @@ jobs:
VCPKG_BUILD_TYPE: release

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

- name: Get latest CMake
# Using 'latest' branch, the latest CMake is installed.
Expand All @@ -56,17 +58,17 @@ jobs:
configurePreset: vcpkg

- name: Upload artifact binary
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: ${{ !startsWith(matrix.os, 'windows') }}
with:
name: tfs-${{ matrix.name }}-${{ matrix.buildtype }}-luajit=${{ matrix.luajit }}-${{ github.sha }}
name: tfs-${{ matrix.os }}-${{ matrix.buildtype }}-luajit=${{ matrix.luajit }}-${{ github.sha }}
path: ${{ runner.workspace }}/build/tfs

- name: Upload artifact binary (exe)
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: ${{ startsWith(matrix.os, 'windows') }}
with:
name: tfs-${{ matrix.name }}-${{ matrix.buildtype }}-luajit=${{ matrix.luajit }}-${{ github.sha }}
name: tfs-${{ matrix.os }}-${{ matrix.buildtype }}-luajit=${{ matrix.luajit }}-${{ github.sha }}
path: |
${{ runner.workspace }}/build/tfs.exe
${{ runner.workspace }}/build/*.dll
Expand All @@ -76,7 +78,7 @@ jobs:
shell: bash

- name: Upload datapack contents
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: tfs-${{ matrix.name }}-${{ matrix.buildtype }}-luajit=${{ matrix.luajit }}-${{ github.sha }}
name: tfs-${{ matrix.os }}-${{ matrix.buildtype }}-luajit=${{ matrix.luajit }}-${{ github.sha }}
path: ${{ github.workspace }}
2 changes: 1 addition & 1 deletion .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
runs-on: ubuntu-latest

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

- name: Setup LLVM repository
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
if: github.event_name == 'push'

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

- name: Build image
run: docker build . --file Dockerfile --tag image
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/lua-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
luac:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: leafo/gh-actions-lua@v10
with:
Expand All @@ -33,7 +33,7 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: leafo/gh-actions-lua@v10
- uses: leafo/gh-actions-luarocks@v4

Expand All @@ -46,7 +46,7 @@ jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: leafo/gh-actions-lua@v10
- uses: leafo/gh-actions-luarocks@v4

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-vcpkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
VCPKG_FEATURE_FLAGS: luajit

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

- name: Get latest CMake
# Using 'latest' branch, the latest CMake is installed.
Expand All @@ -43,7 +43,7 @@ jobs:
shell: bash

- name: Zip the release files
uses: thedoctor0/zip-release@master
uses: thedoctor0/zip-release@0.7.6
with:
type: zip
filename: tfs-${{ github.ref_name }}-${{ matrix.os }}.zip
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest

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

- name: Get latest CMake
# Using 'latest' branch, the latest CMake is installed.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/xml-syntax.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
xmllint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install xmllint
run: sudo apt update -q && sudo apt install -yq libxml2-utils
Expand Down

0 comments on commit 78504af

Please sign in to comment.