Skip to content

Commit

Permalink
gha: Update github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
TSRBerry committed Oct 24, 2022
1 parent 4da564e commit 90a3666
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 26 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
20 changes: 12 additions & 8 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
24 changes: 14 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,39 @@ 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:
tag_name: ${{ github.ref }}
release_name: ${{ env.RELEASE_VERSION }}
draft: false
prerelease: false

- name: Upload Release Asset
id: upload-release-asset
uses: actions/[email protected].1
uses: actions/[email protected].2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down

0 comments on commit 90a3666

Please sign in to comment.