Bug Fix #1403 - Set grade and channel correctly (#1450)

Signed-off-by: David Sims <simsdj82@gmail.com>
This commit is contained in:
David Sims
2024-04-10 00:41:35 +10:00
committed by GitHub
parent e1e182987b
commit 5536f790fd
3 changed files with 15 additions and 4 deletions

View File

@@ -6,8 +6,12 @@ on:
tag: tag:
description: "Git tag (leave empty for dry run)" description: "Git tag (leave empty for dry run)"
required: false required: false
latest:
description: "Release as latest?"
required: true
type: boolean
prerelease: prerelease:
description: "Is this a pre-release?" description: "Release as prerelease?"
required: true required: true
type: boolean type: boolean
@@ -129,7 +133,8 @@ jobs:
# goreleaser won't sign the packages. # goreleaser won't sign the packages.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_TOKEN }} SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_TOKEN }}
SNAPCRAFT_CHANNEL: ${{ inputs.prerelease && 'edge' || 'stable' }} RELEASE_FLAG_PRERELEASE: ${{ inputs.prerelease }}
RELEASE_FLAG_LATEST: ${{ inputs.latest }}
- name: Remove GPG key - name: Remove GPG key
if: always() if: always()

3
.gitignore vendored
View File

@@ -34,3 +34,6 @@ dist/
# Licensei cache file # Licensei cache file
.licensei.cache .licensei.cache
# Development temp folder
tmp

View File

@@ -206,10 +206,13 @@ snapcrafts:
OpenTofu is an OSS tool for building, changing, and versioning infrastructure OpenTofu is an OSS tool for building, changing, and versioning infrastructure
safely and efficiently. OpenTofu can manage existing and popular service safely and efficiently. OpenTofu can manage existing and popular service
providers as well as custom in-house solutions. providers as well as custom in-house solutions.
base: core22 disable: '{{ if eq .Env.RELEASE_FLAG_LATEST "false" }}true{{ else }}false{{ end }}'
grade: "{{ .Env.SNAPCRAFT_CHANNEL }}" channel_templates:
- '{{ if eq .Env.RELEASE_FLAG_PRERELEASE "true" }}latest/edge{{ else }}latest/stable{{ end }}'
grade: '{{ if eq .Env.RELEASE_FLAG_PRERELEASE "true" }}devel{{ else }}stable{{ end }}'
confinement: classic confinement: classic
license: MPL-2.0 license: MPL-2.0
base: core22
apps: apps:
tofu: tofu:
command: tofu command: tofu