Merge branch 'dev' of https://github.com/MeDustyy/JackboxUtility into… #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pre-release App | |
# You may pin to the exact commit or the version. | |
# uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa | |
on: | |
push: | |
branches: [ dev ] | |
jobs: | |
retrievingVersion: | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.versionstep.outputs.version }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Expose git commit data | |
uses: rlespinasse/git-commit-data-action@v1 | |
- name: Retrieve Release Version | |
id: versionstep | |
working-directory: jackbox_patcher | |
run: | | |
DATE=$(date +%s) | |
VERSION=$(more pubspec.yaml | grep version: | cut -d ' ' -f2) | |
echo "version=${VERSION}-beta-${DATE}" >> $GITHUB_OUTPUT | |
build_windows: | |
runs-on: windows-latest | |
needs: retrievingVersion | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: '3.10.0' | |
channel: 'stable' | |
- name: Build windows | |
working-directory: ./jackbox_patcher | |
run: flutter build windows --build-name ${{ needs.retrievingVersion.outputs.version }} -t ./lib/main_beta.dart | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: build_windows | |
path: ./jackbox_patcher/build/windows/runner/Release | |
build_linux: | |
runs-on: ubuntu-latest | |
needs: retrievingVersion | |
steps: | |
- uses: actions/checkout@v3 | |
- run: | | |
sudo apt-get update -y | |
sudo apt install libmpv-dev mpv | |
sudo apt-get install -y ninja-build libgtk-3-dev | |
sudo apt-get install -y libunwind-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio | |
- uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: '3.10.0' | |
channel: 'stable' | |
- name: Build linux | |
working-directory: ./jackbox_patcher | |
run: flutter build linux --build-name ${{ needs.retrievingVersion.outputs.version }} -t ./lib/main_beta.dart | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: build_linux | |
path: ./jackbox_patcher/build/linux/x64/release/bundle | |
build_macos: | |
runs-on: macos-latest | |
needs: retrievingVersion | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: '3.10.0' | |
channel: 'stable' | |
- name: Build Macos | |
working-directory: ./jackbox_patcher | |
run: flutter build macos --build-name ${{ needs.retrievingVersion.outputs.version }} -t ./lib/main_beta.dart | |
- run: | | |
mkdir ./jackbox_patcher/build/macosbuildresult | |
mv ./jackbox_patcher/build/macos/Build/Products/Release/jackbox_patcher.app ./jackbox_patcher/build/macosbuildresult | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: build_macos | |
path: ./jackbox_patcher/build/macosbuildresult | |
upload: | |
runs-on: ubuntu-latest | |
needs: | |
- build_windows | |
- build_linux | |
- retrievingVersion | |
steps: | |
- run: mkdir -p dist | |
- uses: actions/download-artifact@master | |
with: | |
name: build_windows | |
path: dist/JackboxUtility_Windows | |
- uses: actions/download-artifact@master | |
with: | |
name: build_linux | |
path: dist/JackboxUtility_Linux | |
- name: Zipping windows release | |
working-directory: dist/JackboxUtility_Windows | |
run: | | |
zip -r ../../JackboxUtility_Windows.zip * | |
- name: Zipping linux release | |
working-directory: dist/JackboxUtility_Linux | |
run: | | |
zip -r ../../JackboxUtility_Linux.zip * | |
- name: Upload release onto Github | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: 'JackboxUtility_Windows.zip,JackboxUtility_Linux.zip' | |
token: ${{ secrets.GITHUB_TOKEN }} | |
tag: ${{ needs.retrievingVersion.outputs.version }} | |
prerelease: true | |
allowUpdates: true | |