From 7e4b95866ab7933419da4386492e53c0110763ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Palet?= Date: Wed, 24 Apr 2024 14:48:40 +0100 Subject: [PATCH] Publish to Snap Store with classic confinement (beta channel) (#247) * Publish to Snap Store with classic confinement (beta channel) * Do not publish prereleases to APT and Homebrew --- .github/workflows/release.yaml | 5 ++--- .goreleaser.yaml | 27 ++++++++++++++++++--------- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 1ac9efe71..a65f28725 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -2,7 +2,7 @@ name: Release # This GitHub action creates a release when a tag that matches one of the patterns below -# E.g. v0.1.0, v0.1.0-something.1, etc +# E.g. v0.1.0, v0.1.0-something.1, etc on: push: tags: @@ -69,8 +69,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.CLI_RELEASE }} GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} - name: Publish packages to APT repo - # Temporarily not skipping prereleases to test integration with APT - # if: contains(github.ref_name, '-') == false + if: contains(github.ref_name, '-') == false env: GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} GPG_PRIVATE_KEY_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 088597383..a0a7c51b7 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -16,12 +16,12 @@ builds: goos: - windows binary: "stackit" - + - id: macos-builds env: - CGO_ENABLED=0 - BUNDLE_ID=cloud.stackit.cli - - 'APPLE_APPLICATION_IDENTITY=Developer ID Application: Schwarz IT KG' + - "APPLE_APPLICATION_IDENTITY=Developer ID Application: Schwarz IT KG" goos: - darwin binary: "stackit" @@ -80,7 +80,15 @@ nfpms: signs: - artifacts: package - args: ["-u", "{{ .Env.GPG_FINGERPRINT }}", "--output", "${signature}", "--detach-sign", "${artifact}"] + args: + [ + "-u", + "{{ .Env.GPG_FINGERPRINT }}", + "--output", + "${signature}", + "--detach-sign", + "${artifact}", + ] brews: - name: stackit @@ -96,13 +104,12 @@ brews: license: "Apache-2.0" # If set to auto, the release will not be uploaded to the homebrew tap repo # if the tag has a prerelease indicator (e.g. v0.0.1-alpha1) - # Temporarily not skipping prereleases to test integration with Homebrew - # skip_upload: auto + skip_upload: auto snapcrafts: # IDs of the builds for which to create packages for - builds: - - linux-builds + - linux-builds # The name of the snap name: stackit # The canonical title of the application, displayed in the software @@ -111,7 +118,9 @@ snapcrafts: summary: A command-line interface to manage STACKIT resources. description: "A command-line interface to manage STACKIT resources.\nThis CLI is in a BETA state. More services and functionality will be supported soon." license: Apache-2.0 - # Will only publish to `edge` and `beta` channels + confinement: classic + # Grade "devel" will only release to `edge` and `beta` channels + # Grade "stable" will also release to the `candidate` and `stable` channels grade: devel - # Skip publishing until we get approval for used interfaces or classic confinement - publish: false + # Whether to publish the Snap to the store + publish: true