|
@@ -44,12 +44,39 @@ jobs:
|
|
|
name: build-output
|
|
name: build-output
|
|
|
path: build/
|
|
path: build/
|
|
|
|
|
|
|
|
- upload-fap:
|
|
|
|
|
- name: Upload FAP to Existing Release
|
|
|
|
|
|
|
+ create-release:
|
|
|
|
|
+ name: Create GitHub Release
|
|
|
needs: build
|
|
needs: build
|
|
|
- if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
|
|
|
runs-on: ubuntu-latest
|
|
runs-on: ubuntu-latest
|
|
|
|
|
+ if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
|
|
|
+ steps:
|
|
|
|
|
+ - name: Checkout Repository
|
|
|
|
|
+ uses: actions/checkout@v3
|
|
|
|
|
+
|
|
|
|
|
+ - name: Extract Version from Manifest
|
|
|
|
|
+ id: extract_version
|
|
|
|
|
+ run: |
|
|
|
|
|
+ VERSION=$(grep '^version:' manifest.yml | awk '{print $2}')
|
|
|
|
|
+ echo "VERSION=${VERSION}" >> $GITHUB_ENV
|
|
|
|
|
|
|
|
|
|
+ - name: Create Release
|
|
|
|
|
+ id: create_release
|
|
|
|
|
+ uses: actions/create-release@v1
|
|
|
|
|
+ with:
|
|
|
|
|
+ tag_name: v${{ env.VERSION }}
|
|
|
|
|
+ release_name: Metroflip v${{ env.VERSION }}
|
|
|
|
|
+ body: |
|
|
|
|
|
+ **What's New:**
|
|
|
|
|
+ $(cat CHANGELOG.md)
|
|
|
|
|
+ draft: false
|
|
|
|
|
+ prerelease: false
|
|
|
|
|
+ env:
|
|
|
|
|
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
+
|
|
|
|
|
+ upload-fap:
|
|
|
|
|
+ name: Upload FAP to Release
|
|
|
|
|
+ needs: create-release
|
|
|
|
|
+ runs-on: ubuntu-latest
|
|
|
steps:
|
|
steps:
|
|
|
- name: Checkout Repository
|
|
- name: Checkout Repository
|
|
|
uses: actions/checkout@v3
|
|
uses: actions/checkout@v3
|
|
@@ -63,7 +90,7 @@ jobs:
|
|
|
- name: Upload FAP to Release
|
|
- name: Upload FAP to Release
|
|
|
uses: actions/upload-release-asset@v1
|
|
uses: actions/upload-release-asset@v1
|
|
|
with:
|
|
with:
|
|
|
- upload_url: ${{ secrets.GITHUB_RELEASE_UPLOAD_URL }}
|
|
|
|
|
|
|
+ upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
|
asset_path: build/fap/metroflip-${{ env.VERSION }}.fap
|
|
asset_path: build/fap/metroflip-${{ env.VERSION }}.fap
|
|
|
asset_name: metroflip-${{ env.VERSION }}.fap
|
|
asset_name: metroflip-${{ env.VERSION }}.fap
|
|
|
asset_content_type: application/octet-stream
|
|
asset_content_type: application/octet-stream
|