aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authortxtsd <thexerothermicsclerodermoid@gmail.com>2022-02-21 20:56:05 +0530
committertxtsd <thexerothermicsclerodermoid@gmail.com>2022-02-21 21:48:31 +0530
commitd3e7d30ee0e242a6f591b61295adf05bf8488de1 (patch)
tree8eda72bab6d086c36eacd50fc69e1bf020051c58 /.github/workflows
parent5bbb4f31dcc53b251b9f5836e73fff64abe91970 (diff)
downloadPrismLauncher-d3e7d30ee0e242a6f591b61295adf05bf8488de1.tar.gz
PrismLauncher-d3e7d30ee0e242a6f591b61295adf05bf8488de1.tar.bz2
PrismLauncher-d3e7d30ee0e242a6f591b61295adf05bf8488de1.zip
Create releases in a separate workflow
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/trigger_builds.yml94
-rw-r--r--.github/workflows/trigger_release.yml99
2 files changed, 104 insertions, 89 deletions
diff --git a/.github/workflows/trigger_builds.yml b/.github/workflows/trigger_builds.yml
index 3b9cec16..1dfc728e 100644
--- a/.github/workflows/trigger_builds.yml
+++ b/.github/workflows/trigger_builds.yml
@@ -1,7 +1,11 @@
name: Build Application
on:
- [push, pull_request, workflow_dispatch]
+ push:
+ branches-ignore:
+ - 'stable'
+ pull_request:
+ workflow_dispatch:
jobs:
@@ -16,91 +20,3 @@ jobs:
uses: ./.github/workflows/build.yml
with:
build_type: Release
-
- create_release:
- if: contains(github.base_ref, 'refs/heads/stable') && startsWith(github.ref, 'refs/tags/')
- needs: build_release
- runs-on: ubuntu-latest
- outputs:
- upload_url: ${{ steps.create_release.outputs.upload_url }}
- steps:
- - name: Grab and store version
- run: |
- tag_name=$(echo ${{ github.ref }} | grep -oE "[^/]+$")
- echo "VERSION=$tag_name" >> $GITHUB_ENV
- - name: Create release
- id: create_release
- uses: softprops/action-gh-release@v1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- tag_name: ${{ github.ref }}
- name: PolyMC ${{ env.VERSION }}
- draft: true
- prerelease: false
-
- upload_release:
- needs: create_release
- runs-on: ubuntu-latest
- steps:
-
- - name: Download artifacts
- uses: actions/download-artifact@v2
-
- - name: Grab and store version
- run: |
- tag_name=$(echo ${{ github.ref }} | grep -oE "[^/]+$")
- echo "VERSION=$tag_name" >> $GITHUB_ENV
-
- - name: Package artifacts properly
- run: |
- rm -rf *Debug*
-
- mv PolyMC-Linux*/PolyMC.tar.gz PolyMC-Linux-${{ env.VERSION }}.tar.gz
- mv PolyMC-*.AppImage/PolyMC-*.AppImage PolyMC-Linux-${{ env.VERSION }}-x86_64.AppImage
- mv PolyMC-Windows* PolyMC-Windows-${{ env.VERSION }}
- mv PolyMC-macOS*/PolyMC.tar.gz PolyMC-macOS-${{ env.VERSION }}.tar.gz
-
- cd PolyMC-Windows-${{ env.VERSION }}
- zip -r -9 ../PolyMC-Windows-${{ env.VERSION }}.zip *
- cd ..
-
- - name: Upload Linux asset
- uses: actions/upload-release-asset@v1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- upload_url: ${{ needs.create_release.outputs.upload_url }}
- asset_name: PolyMC-Linux-${{ env.VERSION }}.tar.gz
- asset_path: PolyMC-Linux-${{ env.VERSION }}.tar.gz
- asset_content_type: application/gzip
-
- - name: Upload Linux AppImage asset
- uses: actions/upload-release-asset@v1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- upload_url: ${{ needs.create_release.outputs.upload_url }}
- asset_name: PolyMC-Linux-${{ env.VERSION }}-x86_64.AppImage
- asset_path: PolyMC-Linux-${{ env.VERSION }}-x86_64.AppImage
- asset_content_type: application/x-executable
-
- - name: Upload Windows asset
- uses: actions/upload-release-asset@v1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- upload_url: ${{ needs.create_release.outputs.upload_url }}
- asset_name: PolyMC-Windows-${{ env.VERSION }}.zip
- asset_path: PolyMC-Windows-${{ env.VERSION }}.zip
- asset_content_type: application/zip
-
- - name: Upload macOS asset
- uses: actions/upload-release-asset@v1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- upload_url: ${{ needs.create_release.outputs.upload_url }}
- asset_name: PolyMC-macOS-${{ env.VERSION }}.tar.gz
- asset_path: PolyMC-macOS-${{ env.VERSION }}.tar.gz
- asset_content_type: application/gzip
diff --git a/.github/workflows/trigger_release.yml b/.github/workflows/trigger_release.yml
new file mode 100644
index 00000000..b487e731
--- /dev/null
+++ b/.github/workflows/trigger_release.yml
@@ -0,0 +1,99 @@
+name: Build Application and Make Release
+
+on:
+ push:
+ tags:
+ - '*'
+
+jobs:
+
+ build_release:
+ name: Build Release
+ uses: ./.github/workflows/build.yml
+ with:
+ build_type: Release
+
+ create_release:
+ needs: build_release
+ runs-on: ubuntu-latest
+ outputs:
+ upload_url: ${{ steps.create_release.outputs.upload_url }}
+ steps:
+ - name: Grab and store version
+ run: |
+ tag_name=$(echo ${{ github.ref }} | grep -oE "[^/]+$")
+ echo "VERSION=$tag_name" >> $GITHUB_ENV
+ - name: Create release
+ id: create_release
+ uses: softprops/action-gh-release@v1
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ tag_name: ${{ github.ref }}
+ name: PolyMC ${{ env.VERSION }}
+ draft: true
+ prerelease: false
+
+ upload_release:
+ needs: create_release
+ runs-on: ubuntu-latest
+ steps:
+
+ - name: Download artifacts
+ uses: actions/download-artifact@v2
+
+ - name: Grab and store version
+ run: |
+ tag_name=$(echo ${{ github.ref }} | grep -oE "[^/]+$")
+ echo "VERSION=$tag_name" >> $GITHUB_ENV
+
+ - name: Package artifacts properly
+ run: |
+ mv PolyMC-Linux*/PolyMC.tar.gz PolyMC-Linux-${{ env.VERSION }}.tar.gz
+ mv PolyMC-*.AppImage/PolyMC-*.AppImage PolyMC-Linux-${{ env.VERSION }}-x86_64.AppImage
+ mv PolyMC-Windows* PolyMC-Windows-${{ env.VERSION }}
+ mv PolyMC-macOS*/PolyMC.tar.gz PolyMC-macOS-${{ env.VERSION }}.tar.gz
+
+ cd PolyMC-Windows-${{ env.VERSION }}
+ zip -r -9 ../PolyMC-Windows-${{ env.VERSION }}.zip *
+ cd ..
+
+ - name: Upload Linux asset
+ uses: actions/upload-release-asset@v1
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ upload_url: ${{ needs.create_release.outputs.upload_url }}
+ asset_name: PolyMC-Linux-${{ env.VERSION }}.tar.gz
+ asset_path: PolyMC-Linux-${{ env.VERSION }}.tar.gz
+ asset_content_type: application/gzip
+
+ - name: Upload Linux AppImage asset
+ uses: actions/upload-release-asset@v1
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ upload_url: ${{ needs.create_release.outputs.upload_url }}
+ asset_name: PolyMC-Linux-${{ env.VERSION }}-x86_64.AppImage
+ asset_path: PolyMC-Linux-${{ env.VERSION }}-x86_64.AppImage
+ asset_content_type: application/x-executable
+
+ - name: Upload Windows asset
+ uses: actions/upload-release-asset@v1
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ upload_url: ${{ needs.create_release.outputs.upload_url }}
+ asset_name: PolyMC-Windows-${{ env.VERSION }}.zip
+ asset_path: PolyMC-Windows-${{ env.VERSION }}.zip
+ asset_content_type: application/zip
+
+ - name: Upload macOS asset
+ uses: actions/upload-release-asset@v1
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ upload_url: ${{ needs.create_release.outputs.upload_url }}
+ asset_name: PolyMC-macOS-${{ env.VERSION }}.tar.gz
+ asset_path: PolyMC-macOS-${{ env.VERSION }}.tar.gz
+ asset_content_type: application/gzip