diff --git a/.github/workflows/linux_deploy.yml b/.github/workflows/linux_deploy.yml index 0ec4111aa..2fdfc6dc9 100644 --- a/.github/workflows/linux_deploy.yml +++ b/.github/workflows/linux_deploy.yml @@ -1,27 +1,32 @@ name: デプロイ(Linux) -on: [workflow_dispatch] -permissions: +on: + workflow_dispatch: + release: + types: [published] + +permissions: contents: write -jobs: - build_for_linux: + +jobs: + build_for_linux: name: Linux用ビルド runs-on: ubuntu-latest - steps: + steps: - name: Checkout code uses: actions/checkout@v3 - name: Install Flutter Develop dependencies run: sudo apt install -y clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev libstdc++-12-dev - + - name: Install Flutter uses: subosito/flutter-action@v2 - with: + with: channel: 'stable' cache: true - name: Cache pubspec dependencies uses: actions/cache@v3 - with: + with: path: | ${{ env.FLUTTER_HOME }}/.pub-cache **/.packages @@ -46,7 +51,7 @@ jobs: - name: Compress App run: | cd build/linux/x64/release/bundle - tar -czaf miria-$VERSION-x86_64.tar.gz + tar -czaf miria-$VERSION-x86_64.tar.gz * # - name: Upload artifact # uses: actions/upload-artifacts@v3 @@ -57,4 +62,7 @@ jobs: - name: Upload artifact to release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: gh release upload v$VERSION ./build/linux/x64/release/bundle/miria-$VERSION-x86_64.tar.gz \ No newline at end of file + run: gh release upload v$VERSION ./build/linux/x64/release/bundle/miria-$VERSION-x86_64.tar.gz + + - name: Remove artifact.tar.gz + run: rm build/linux/x64/release/bundle/miria-$VERSION-x86_64.tar.gz