refactor: use "Reusing workflows"

This commit is contained in:
Peter Galonza 2024-05-27 00:26:45 +03:00
parent 7f26367a59
commit bedf9cdd19
4 changed files with 29 additions and 59 deletions

23
.github/workflows/build-jobs.yaml vendored Normal file
View File

@ -0,0 +1,23 @@
name: Build jobs
on:
workflow_call:
jobs:
build:
name: build
runs-on: ubuntu-latest
container: ghcr.io/${{ github.repository_owner }}/devkita64-atmosphere:latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build Atmosphere
run: |
source /opt/venv/bin/activate
git config --global --add safe.directory "*"
make
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: atmosphere-artifacts
path: ./out/nintendo_nx_arm64_armv8a/release/*

View File

@ -12,20 +12,5 @@ defaults:
shell: bash
jobs:
build:
name: build
runs-on: ubuntu-latest
container: ghcr.io/${{ github.repository_owner }}/devkita64-atmosphere:latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build Atmosphere
run: |
source /opt/venv/bin/activate
git config --global --add safe.directory "*"
make
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: atmosphere-artifacts
path: ./out/nintendo_nx_arm64_armv8a/release/*
build-workflow:
uses: ./.github/workflows/build-jobs.yaml

View File

@ -17,28 +17,8 @@ defaults:
shell: bash
jobs:
build:
name: build
runs-on: ubuntu-latest
container: ghcr.io/${{ github.repository_owner }}/devkita64-atmosphere:latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build Atmosphere
run: |
source /opt/venv/bin/activate
git config --global --add safe.directory "*"
make
- name: Remove debug
run: rm ./out/nintendo_nx_arm64_armv8a/release/atmosphere-*-debug.zip
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: atmosphere-artifacts
path: ./out/nintendo_nx_arm64_armv8a/release/*
build-workflow:
uses: ./.github/workflows/build-jobs.yaml
create-prerelease:
runs-on: ubuntu-latest
needs: build

View File

@ -17,26 +17,8 @@ defaults:
shell: bash
jobs:
build:
name: build
runs-on: ubuntu-latest
container: ghcr.io/${{ github.repository_owner }}/devkita64-atmosphere:latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build Atmosphere
run: |
source /opt/venv/bin/activate
git config --global --add safe.directory "*"
make
- name: Remove debug
run: rm ./out/nintendo_nx_arm64_armv8a/release/atmosphere-*-debug.zip
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: atmosphere-artifacts
path: ./out/nintendo_nx_arm64_armv8a/release/*
build-workflow:
uses: ./.github/workflows/build-jobs.yaml
create-release:
runs-on: ubuntu-latest
needs: build