diff --git a/.github/workflows/release_tags.yml b/.github/workflows/release_tags.yml index 29eea0d..8b27c39 100644 --- a/.github/workflows/release_tags.yml +++ b/.github/workflows/release_tags.yml @@ -1,105 +1,42 @@ name: Quasar Electron Build and Release on: - push: - tags: - - v* -jobs: release: - name: Create Github Release - runs-on: ubuntu-latest - steps: - - name: Create Release - id: create_release - uses: actions/create-release@v1.0.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref_name }} - release_name: ${{ github.ref_name }} - draft: false - prerelease: false - - name: Output Release URL File - run: echo "${{ steps.create_release.outputs.upload_url }}" > release_url.txt - - name: Save Release URL File for publish - uses: actions/upload-artifact@v1 - with: - name: release_url - path: release_url.txt + types: + - published +jobs: build-linux: runs-on: ubuntu-latest - needs: [release] steps: - uses: actions/checkout@v3 - - name: Load Release URL File from release job - uses: actions/download-artifact@v1 - with: - name: release_url - name: Setup NodeJS Environment uses: actions/setup-node@v3 with: - node-version: '18' + node-version: '20' - run: yarn install && npm -g install @quasar/cli - run: quasar build --mode electron --target darwin --target linux - run: zip -r ./Typesense-Dashboard-linux-x64-${{ github.ref_name }}.zip ./dist/electron/Typesense-Dashboard-linux-x64 - run: zip -r ./Typesense-Dashboard-darwin-x64-${{ github.ref_name }}.zip ./dist/electron/Typesense-Dashboard-darwin-x64 - - name: Get Release File Name & Upload URL - id: get_release_info - run: | - value=`cat release_url/release_url.txt` - echo ::set-output name=upload_url::$value - env: - TAG_REF_NAME: ${{ github.ref }} - REPOSITORY_NAME: ${{ github.repository }} - name: Upload a Release Asset linux - uses: actions/upload-release-asset@v1.0.2 + run: gh release upload ${{ github.ref_name }} ./Typesense-Dashboard-linux-x64-${{ github.ref_name }}.zip --clobber env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.get_release_info.outputs.upload_url }} - asset_path: ./Typesense-Dashboard-linux-x64-${{ github.ref_name }}.zip - asset_name: Typesense-Dashboard-linux-x64-${{ github.ref_name }}.zip - asset_content_type: appliction/zip + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Upload a Release Asset darwin - uses: actions/upload-release-asset@v1.0.2 + run: gh release upload ${{ github.ref_name }} ./Typesense-Dashboard-darwin-x64-${{ github.ref_name }}.zip --clobber env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.get_release_info.outputs.upload_url }} - asset_path: ./Typesense-Dashboard-darwin-x64-${{ github.ref_name }}.zip - asset_name: Typesense-Dashboard-darwin-x64-${{ github.ref_name }}.zip - asset_content_type: appliction/zip + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} build-windows: runs-on: windows-latest - needs: [release] steps: - uses: actions/checkout@v3 - - name: Load Release URL File from release job - uses: actions/download-artifact@v1 - with: - name: release_url - name: Setup NodeJS Environment uses: actions/setup-node@v3 with: - node-version: '18' + node-version: '20' - run: yarn install && npm -g install @quasar/cli electron-installer-zip - run: quasar build --mode electron --target win32 - run: electron-installer-zip ./dist/electron/Typesense-Dashboard-win32-x64 ./Typesense-Dashboard-win32-x64-${{ github.ref_name }}.zip - - name: Get Release File Name & Upload URL - id: get_release_info - shell: bash - run: | - value=`cat release_url/release_url.txt` - echo ::set-output name=upload_url::$value - env: - TAG_REF_NAME: ${{ github.ref }} - REPOSITORY_NAME: ${{ github.repository }} - name: Upload a Release Asset win32 - uses: actions/upload-release-asset@v1.0.2 + run: gh release upload ${{ github.ref_name }} ./Typesense-Dashboard-win32-x64-${{ github.ref_name }}.zip --clobber env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.get_release_info.outputs.upload_url }} - asset_path: ./Typesense-Dashboard-win32-x64-${{ github.ref_name }}.zip - asset_name: Typesense-Dashboard-win32-x64-${{ github.ref_name }}.zip - asset_content_type: appliction/zip + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}