From 9f9c4ff508dd259fd6aa5eb50ada4e4d689c269e Mon Sep 17 00:00:00 2001 From: Xeovalyte Date: Tue, 24 Oct 2023 22:41:14 +0200 Subject: [PATCH] feat: Changed ci --- .gitea/workflows/workflow.yml | 72 +++++------------------------------ 1 file changed, 10 insertions(+), 62 deletions(-) diff --git a/.gitea/workflows/workflow.yml b/.gitea/workflows/workflow.yml index 80da0af..bead9db 100644 --- a/.gitea/workflows/workflow.yml +++ b/.gitea/workflows/workflow.yml @@ -3,45 +3,13 @@ name: 'publish' on: push jobs: - create-release: - permissions: - contents: write - runs-on: ubuntu-latest - outputs: - release_id: ${{ steps.create-release.outputs.result }} - - steps: - - uses: actions/checkout@v3 - - name: setup node - uses: actions/setup-node@v3 - with: - node-version: 16 - - name: get version - run: echo "PACKAGE_VERSION=$(node -p "require('./toos-dashboard/package.json').version")" >> $GITHUB_ENV - - name: create release - id: create-release - uses: actions/github-script@v6 - with: - script: | - const { data } = await github.rest.repos.createRelease({ - owner: context.repo.owner, - repo: context.repo.repo, - tag_name: `app-v${process.env.PACKAGE_VERSION}`, - name: `Desktop App v${process.env.PACKAGE_VERSION}`, - body: 'Take a look at the assets to download and install this app.', - draft: true, - prerelease: false - }) - return data.id - - build-tauri: - needs: create-release + publish-tauri: permissions: contents: write strategy: fail-fast: false matrix: - platform: [ubuntu-latest] + platform: [ubuntu-20.04] runs-on: ${{ matrix.platform }} steps: @@ -53,11 +21,10 @@ jobs: - name: install Rust stable uses: dtolnay/rust-toolchain@stable - name: install dependencies (ubuntu only) - if: matrix.platform == 'ubuntu-latest' + if: matrix.platform == 'ubuntu-20.04' run: | - apt-get update - apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf - npm install -g vite + sudo apt-get update + sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf - name: install frontend dependencies run: yarn install # change this to npm or pnpm depending on which one you use workdir: toos-dashboard/ @@ -66,27 +33,8 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - releaseId: ${{ needs.create-release.outputs.release_id }} - - publish-release: - permissions: - contents: write - runs-on: ubuntu-latest - needs: [create-release, build-tauri] - - steps: - - name: publish release - id: publish-release - uses: actions/github-script@v6 - workdir: toos-dashboard/ - env: - release_id: ${{ needs.create-release.outputs.release_id }} - with: - script: | - github.rest.repos.updateRelease({ - owner: context.repo.owner, - repo: context.repo.repo, - release_id: process.env.release_id, - draft: false, - prerelease: false - }) + tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version + releaseName: 'App v__VERSION__' + releaseBody: 'See the assets to download this version and install.' + releaseDraft: true + prerelease: false