diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index b455f5480..621eb3a90 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -16,6 +16,8 @@ jobs: with: version: 3.x repo-token: ${{ secrets.GITHUB_TOKEN }} + - name: Install Snapcraft + uses: samuelmeuli/action-snapcraft@v2 - name: Publish from staging run: "task artifacts:publish:${{ github.ref_name }}" env: @@ -23,6 +25,17 @@ jobs: AWS_SECRET_ACCESS_KEY: "${{ secrets.PUBLISHER_KEY_SECRET }}" AWS_DEFAULT_REGION: us-west-2 shell: bash + - name: Download Snap from Release + uses: i3h/download-release-asset@v1 + with: + owner: wavetermdev + repo: waveterm + tag: ${{github.ref_name}} + file: /*.snap/ + - name: Publish to Snapcraft + run: "task artifacts:publish:snap:${{ github.ref_name }}" + env: + SNAPCRAFT_STORE_CREDENTIALS: "${{secrets.SNAPCRAFT_LOGIN_CREDS}}" bump-winget: if: ${{ startsWith(github.ref, 'refs/tags/') && !contains(github.ref_name, 'beta') }} runs-on: windows-latest diff --git a/Taskfile.yml b/Taskfile.yml index 2fc161a36..afabb55fc 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -230,6 +230,14 @@ tasks: echo "https://$SUFFIX" fi done + artifacts:publish:snap:*: + desc: Publishes the specified artifacts version to Snapcraft. + vars: + UP_VERSION: '{{ replace "v" "" (index .MATCH 0)}}' + CHANNEL: '{{if contains .UP_VERSION "beta"}}beta{{else}}beta,stable{{end}}' + cmd: | + snapcraft upload --release={{.CHANNEL}} waveterm_{{.UP_VERSION}}_arm64.snap + snapcraft upload --release={{.CHANNEL}} waveterm_{{.UP_VERSION}}_amd64.snap artifacts:publish:winget:*: desc: Submits a version bump request to WinGet for the latest release. diff --git a/electron-builder.config.cjs b/electron-builder.config.cjs index 4415b26fb..0ef69526b 100644 --- a/electron-builder.config.cjs +++ b/electron-builder.config.cjs @@ -88,6 +88,7 @@ const config = { base: "core22", confinement: "classic", allowNativeWayland: true, + artifactName: `${productName}_${version}_${arch}.${ext}`, }, publish: { provider: "generic",