This commit is contained in:
Mateusz Faderewski 2023-12-17 20:35:18 +01:00
parent fab89401c4
commit dbd5939a9e

View File

@ -13,41 +13,41 @@ on:
workflow_dispatch: workflow_dispatch:
jobs: jobs:
build-firmware: # build-firmware:
runs-on: ubuntu-latest # runs-on: ubuntu-latest
steps: # steps:
- name: Download SummerCart64 repository # - name: Download SummerCart64 repository
uses: actions/checkout@v3 # uses: actions/checkout@v3
- name: Set package version # - name: Set package version
uses: frabert/replace-string-action@v2 # uses: frabert/replace-string-action@v2
id: version # id: version
with: # with:
pattern: '\/' # pattern: '\/'
string: '${{ github.ref_name }}' # string: '${{ github.ref_name }}'
replace-with: '-' # replace-with: '-'
- name: Build firmware # - name: Build firmware
run: ./docker_build.sh release --force-clean # run: ./docker_build.sh release --force-clean
env: # env:
SC64_VERSION: ${{ steps.version.outputs.replaced }} # SC64_VERSION: ${{ steps.version.outputs.replaced }}
- name: Upload artifact # - name: Upload artifact
uses: actions/upload-artifact@v3 # uses: actions/upload-artifact@v3
with: # with:
name: sc64-pkg-${{ steps.version.outputs.replaced }} # name: sc64-pkg-${{ steps.version.outputs.replaced }}
path: | # path: |
sc64-extra-${{ steps.version.outputs.replaced }}.zip # sc64-extra-${{ steps.version.outputs.replaced }}.zip
sc64-firmware-${{ steps.version.outputs.replaced }}.bin # sc64-firmware-${{ steps.version.outputs.replaced }}.bin
- name: Upload release assets # - name: Upload release assets
if: github.event_name == 'release' && github.event.action == 'created' # if: github.event_name == 'release' && github.event.action == 'created'
uses: softprops/action-gh-release@v0.1.15 # uses: softprops/action-gh-release@v0.1.15
with: # with:
files: | # files: |
sc64-extra-${{ steps.version.outputs.replaced }}.zip # sc64-extra-${{ steps.version.outputs.replaced }}.zip
sc64-firmware-${{ steps.version.outputs.replaced }}.bin # sc64-firmware-${{ steps.version.outputs.replaced }}.bin
build-deployer: build-deployer:
strategy: strategy:
@ -59,7 +59,7 @@ jobs:
release-dir: target/release release-dir: target/release
executable: sc64deployer.exe executable: sc64deployer.exe
name: sc64-deployer-windows name: sc64-deployer-windows
options: -c -a -f package: tar.exe -c -a -f
extension: zip extension: zip
- version: windows-32bit - version: windows-32bit
@ -68,7 +68,7 @@ jobs:
release-dir: target/i686-pc-windows-msvc/release release-dir: target/i686-pc-windows-msvc/release
executable: sc64deployer.exe executable: sc64deployer.exe
name: sc64-deployer-windows-32bit name: sc64-deployer-windows-32bit
options: -c -a -f package: tar.exe -c -a -f
extension: zip extension: zip
- version: linux - version: linux
@ -77,7 +77,7 @@ jobs:
release-dir: target/release release-dir: target/release
executable: sc64deployer executable: sc64deployer
name: sc64-deployer-linux name: sc64-deployer-linux
options: -czf package: tar -czf
extension: tar.gz extension: tar.gz
- version: macos - version: macos
@ -85,7 +85,7 @@ jobs:
release-dir: target/release release-dir: target/release
executable: sc64deployer executable: sc64deployer
name: sc64-deployer-macos name: sc64-deployer-macos
options: -czf package: tar -czf
extension: tgz extension: tgz
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
@ -117,7 +117,7 @@ jobs:
PACKAGE_DIR=$(pwd)/package PACKAGE_DIR=$(pwd)/package
mkdir -p $PACKAGE_DIR mkdir -p $PACKAGE_DIR
cd ${{ matrix.release-dir }} cd ${{ matrix.release-dir }}
tar ${{ matrix.options }} $PACKAGE_DIR/${{ matrix.name }}-${{ steps.version.outputs.replaced }}.${{ matrix.extension }} ${{ matrix.executable }} ${{ matrix.package }} $PACKAGE_DIR/${{ matrix.name }}-${{ steps.version.outputs.replaced }}.${{ matrix.extension }} ${{ matrix.executable }}
shell: bash shell: bash
working-directory: sw/deployer working-directory: sw/deployer