chore: update github actions

This commit is contained in:
Stéphane Lesimple
2023-09-30 12:56:23 +02:00
parent 1338598abb
commit 45ff2c5fda
5 changed files with 49 additions and 52 deletions

View File

@@ -33,7 +33,9 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v4
with:
persist-credentials: false
# Initializes the CodeQL tools for scanning. # Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL - name: Initialize CodeQL

View File

@@ -21,8 +21,8 @@ else
fi fi
archive=dvdisaster-$(echo "$github_ref" | grep -Eo '[^/]+$')-$suffix.zip archive=dvdisaster-$(echo "$github_ref" | grep -Eo '[^/]+$')-$suffix.zip
echo "Archive name is $archive" [ -n "$GITHUB_OUTPUT" ] && echo "archive=$archive" >> "$GITHUB_OUTPUT"
echo "::set-output name=archive::$archive" echo "appimage is <$archive>"
mkdir -p dist/locale mkdir -p dist/locale
cp -vr locale/*/ dist/locale/ cp -vr locale/*/ dist/locale/
@@ -48,4 +48,4 @@ if command -v zip >/dev/null; then
zip -9r $archive ${archive/.zip/} zip -9r $archive ${archive/.zip/}
mv ${archive/.zip/} dist mv ${archive/.zip/} dist
fi fi
echo "dist done ($archive)" echo "dist done ($archive)"

View File

@@ -11,8 +11,8 @@ else
fi fi
archive="dvdisaster-$(echo "$github_ref" | grep -Eo '[^/]+$')$suffix.dmg" archive="dvdisaster-$(echo "$github_ref" | grep -Eo '[^/]+$')$suffix.dmg"
echo "Archive name is $archive" [ -n "$GITHUB_OUTPUT" ] && echo "archive=$archive" >> "$GITHUB_OUTPUT"
echo "::set-output name=archive::$archive" echo "mac dmg is <$archive>"
mkdir -p dist mkdir -p dist

View File

@@ -1,8 +1,9 @@
name: autobuild name: autobuild
on: on:
release: push:
types: [published] tags:
- "v*"
jobs: jobs:
mac: mac:
@@ -14,7 +15,9 @@ jobs:
- ui: cli - ui: cli
clionly: --with-gui=no clionly: --with-gui=no
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
with:
persist-credentials: false
- name: install prerequisites - name: install prerequisites
env: env:
HOMEBREW_NO_INSTALL_CLEANUP: 1 HOMEBREW_NO_INSTALL_CLEANUP: 1
@@ -45,16 +48,11 @@ jobs:
- name: build dist - name: build dist
run: ./.github/workflows/make-mac-app.sh ${{ github.ref }} run: ./.github/workflows/make-mac-app.sh ${{ github.ref }}
id: dist id: dist
- name: Upload Release Asset - name: Release
id: upload-release-asset uses: softprops/action-gh-release@v1
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
upload_url: ${{ github.event.release.upload_url }} files: ${{ steps.dist.outputs.archive }}
asset_path: ./${{ steps.dist.outputs.archive }} draft: true
asset_name: ${{ steps.dist.outputs.archive }}
asset_content_type: application/zip
win: win:
runs-on: windows-latest runs-on: windows-latest
@@ -86,7 +84,9 @@ jobs:
- name: git config - name: git config
run: git config --global core.autocrlf input run: git config --global core.autocrlf input
shell: bash shell: bash
- uses: actions/checkout@v2 - uses: actions/checkout@v4
with:
persist-credentials: false
- name: configure - name: configure
run: ./configure ${{ matrix.clionly }} run: ./configure ${{ matrix.clionly }}
- name: make - name: make
@@ -111,21 +111,18 @@ jobs:
run: | run: |
cd dist cd dist
dvdisaster.exe --version dvdisaster.exe --version
- name: Upload Release Asset - name: Release
id: upload-release-asset uses: softprops/action-gh-release@v1
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
upload_url: ${{ github.event.release.upload_url }} files: ${{ steps.dist.outputs.archive }}
asset_path: ./${{ steps.dist.outputs.archive }} draft: true
asset_name: ${{ steps.dist.outputs.archive }}
asset_content_type: application/zip
linux64-cli: linux64-cli:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
with:
persist-credentials: false
- name: install prerequisites - name: install prerequisites
run: sudo apt update && sudo apt install -y libglib2.0-dev ghostscript man run: sudo apt update && sudo apt install -y libglib2.0-dev ghostscript man
- name: configure - name: configure
@@ -140,21 +137,18 @@ jobs:
- name: build dist - name: build dist
run: ./.github/workflows/make-dist.sh ${{ github.ref }} run: ./.github/workflows/make-dist.sh ${{ github.ref }}
id: dist id: dist
- name: Upload Release Asset - name: Release
id: upload-release-asset uses: softprops/action-gh-release@v1
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
upload_url: ${{ github.event.release.upload_url }} files: ${{ steps.dist.outputs.archive }}
asset_path: ./${{ steps.dist.outputs.archive }} draft: true
asset_name: ${{ steps.dist.outputs.archive }}
asset_content_type: application/zip
linux64-appimage: linux64-appimage:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
with:
persist-credentials: false
- name: install prerequisites on host - name: install prerequisites on host
run: sudo apt-get update && sudo apt-get install -y fuse run: sudo apt-get update && sudo apt-get install -y fuse
- name: docker - name: docker
@@ -196,15 +190,10 @@ jobs:
run: | run: |
chmod 755 dvdisaster*.AppImage && ./dvdisaster*.AppImage --version chmod 755 dvdisaster*.AppImage && ./dvdisaster*.AppImage --version
archive=$(ls -1 dvdisaster*.AppImage) archive=$(ls -1 dvdisaster*.AppImage)
echo "::set-output name=archive::$archive" echo "archive=$archive" >> "$GITHUB_OUTPUT"
echo "appimage is <$archive>" echo "appimage is <$archive>"
- name: Upload Release Asset - name: Release
id: upload-release-asset uses: softprops/action-gh-release@v1
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
upload_url: ${{ github.event.release.upload_url }} files: ${{ steps.dist.outputs.archive }}
asset_path: ./${{ steps.dist.outputs.archive }} draft: true
asset_name: ${{ steps.dist.outputs.archive }}
asset_content_type: application/octet-stream

View File

@@ -15,7 +15,9 @@ jobs:
- printf: fmtdbg - printf: fmtdbg
debugprintf: --with-debug-printf-format debugprintf: --with-debug-printf-format
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
with:
persist-credentials: false
- name: install prerequisites - name: install prerequisites
env: env:
HOMEBREW_NO_INSTALL_CLEANUP: 1 HOMEBREW_NO_INSTALL_CLEANUP: 1
@@ -83,7 +85,9 @@ jobs:
- name: git config - name: git config
run: git config --global core.autocrlf input run: git config --global core.autocrlf input
shell: bash shell: bash
- uses: actions/checkout@v2 - uses: actions/checkout@v4
with:
persist-credentials: false
- name: configure - name: configure
run: | run: |
echo running ./configure ${{ matrix.clionly }} ${{ matrix.debugprintf }} --with-werror echo running ./configure ${{ matrix.clionly }} ${{ matrix.debugprintf }} --with-werror
@@ -126,7 +130,9 @@ jobs:
- printf: fmtdbg - printf: fmtdbg
debugprintf: --with-debug-printf-format debugprintf: --with-debug-printf-format
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
with:
persist-credentials: false
- name: install prerequisites - name: install prerequisites
env: env:
DEBIAN_FRONTEND: noninteractive DEBIAN_FRONTEND: noninteractive