From 90a36660d614436a1988d59f3d5d9d04d24f95a3 Mon Sep 17 00:00:00 2001 From: TSR Berry <20988865+TSRBerry@users.noreply.github.com> Date: Mon, 24 Oct 2022 11:24:24 +0200 Subject: [PATCH] gha: Update github workflows --- .github/workflows/build.yml | 18 ++++++++++-------- .github/workflows/nightly.yml | 20 ++++++++++++-------- .github/workflows/release.yml | 24 ++++++++++++++---------- 3 files changed, 36 insertions(+), 26 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 203382a..8ccec6b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,29 +6,31 @@ jobs: build: runs-on: ubuntu-latest + container: + image: devkitpro/devkita64:latest + steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 with: submodules: true - - uses: spacemeowx2/devkitpro-action@v2 - with: - libnx-rev: 5ca15e7696e174c41ee94974d62602fde722ac3b - cmd: make -j8 + + - name: Build + run: make -j8 - name: Upload built files - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v3 with: name: sdcard path: out/sd - name: Upload elf file - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v3 with: name: ldn_mitm.elf path: ldn_mitm/ldn_mitm.elf - name: Upload elf file - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v3 with: name: ldn_mitm.elf path: overlay/overlay.elf diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 1b791fe..506857d 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -8,34 +8,38 @@ jobs: build: runs-on: ubuntu-latest + container: + image: devkitpro/devkita64:latest + steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 with: submodules: true + - name: update Atmosphere-libs run: | pushd Atmosphere-libs + git fetch --all git reset --hard origin/master popd - - uses: spacemeowx2/devkitpro-action@v2 - with: - libnx-rev: master - cmd: make -j8 + + - name: Build + run: make -j8 - name: Upload built files - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v3 with: name: sdcard path: out/sd - name: Upload elf file - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v3 with: name: ldn_mitm.elf path: ldn_mitm/ldn_mitm.elf - name: Upload elf file - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v3 with: name: ldn_mitm.elf path: overlay/overlay.elf diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4c88f66..68b5ea7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,25 +9,28 @@ jobs: build: runs-on: ubuntu-latest + container: + image: devkitpro/devkita64:latest + steps: - name: Set env - run: echo ::set-env name=RELEASE_VERSION::$(echo ${GITHUB_REF:10}) - env: - ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' - - uses: actions/checkout@v1 + run: echo "RELEASE_VERSION=${GITHUB_REF:10}" >> $GITHUB_ENV + + - uses: actions/checkout@v3 with: submodules: true - - uses: spacemeowx2/devkitpro-action@v2 - with: - libnx-rev: 9865dbf92177c358b88fa7542b628d8a8a2a9d74 - cmd: make -j8 + + - name: Build + run: make -j8 + - name: Pack run: | cd ./out/sd sudo zip -r ./ldn_mitm_${{ env.RELEASE_VERSION }}.zip atmosphere switch + - name: Create Release id: create_release - uses: actions/create-release@v1 + uses: actions/create-release@v1.1.4 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: @@ -35,9 +38,10 @@ jobs: release_name: ${{ env.RELEASE_VERSION }} draft: false prerelease: false + - name: Upload Release Asset id: upload-release-asset - uses: actions/upload-release-asset@v1.0.1 + uses: actions/upload-release-asset@v1.0.2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: