name: Build and Release Metroflip on: push: tags: - 'v*.*.*' jobs: build: runs-on: ubuntu-latest steps: - name: Checkout Repository uses: actions/checkout@v3 - name: Set up Python uses: actions/setup-python@v4 with: python-version: 3.x - name: Install UFBT run: pip install ufbt - name: Parse Version from Manifest id: version run: | VERSION=$(grep '^version:' manifest.yml | awk '{print $2}') echo "VERSION=${VERSION}" >> $GITHUB_ENV echo "::set-output name=version::${VERSION}" - name: Build Metroflip run: | ufbt update ufbt fap_metroflip - name: Prepare Release Directory run: | mkdir -p releases/${VERSION} mv build/fap/metroflip.fap releases/${VERSION}/metroflip.fap - name: Upload Build Artifact uses: actions/upload-artifact@v3 with: name: metroflip-${{ env.VERSION }} path: releases/${{ env.VERSION }}/metroflip.fap release: needs: build runs-on: ubuntu-latest steps: - name: Download Build Artifact uses: actions/download-artifact@v3 with: name: metroflip-${{ env.VERSION }} - name: Create GitHub Release uses: actions/create-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: tag_name: ${{ github.ref_name }} release_name: Metroflip ${{ github.ref_name }} draft: false prerelease: false files: releases/${{ env.VERSION }}/metroflip.fap body: | ## Changes See the [CHANGELOG.md](https://github.com/luu176/Metroflip/blob/${{ github.ref_name }}/CHANGELOG.md) for details.