added release and prerelease CI

This commit is contained in:
Peter Galonza 2024-05-14 01:33:49 +03:00
parent 06c40b4d41
commit 40cc6dc560
2 changed files with 112 additions and 0 deletions

56
.github/workflows/prerelease.yml vendored Normal file
View File

@ -0,0 +1,56 @@
name: Create prerelease
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+-prerelease'
permissions:
contents: write
concurrency:
group: "prerelease"
cancel-in-progress: false
defaults:
run:
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/*
create-prerelease:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: atmosphere-artifacts
path: "./"
- name: Create release
uses: ncipollo/release-action@v1
with:
artifacts: "atmosphere-*.zip,fusee.bin"
prerelease: true
name: "Atmosphère ${{ github.ref_name }}"

56
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,56 @@
name: Create release
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
permissions:
contents: write
concurrency:
group: "release"
cancel-in-progress: false
defaults:
run:
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/*
create-release:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: atmosphere-artifacts
path: "./"
- name: Create release
uses: ncipollo/release-action@v1
with:
artifacts: "atmosphere-*.zip,fusee.bin"
prerelease: false
name: "Atmosphère ${{ github.ref_name }}"