Skip to content

Commit

Permalink
Publish to Snap Store with classic confinement (beta channel) (#247)
Browse files Browse the repository at this point in the history
* Publish to Snap Store with classic confinement (beta channel)

* Do not publish prereleases to APT and Homebrew
  • Loading branch information
joaopalet authored Apr 24, 2024
1 parent d5a495f commit 7e4b958
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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 }}
Expand Down
27 changes: 18 additions & 9 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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

0 comments on commit 7e4b958

Please sign in to comment.