From f3c4c39d2d483a9a46c40928bff12cf9b5a1b9a8 Mon Sep 17 00:00:00 2001 From: Alexander Sharov Date: Fri, 27 Dec 2024 20:33:29 +0400 Subject: [PATCH] feat: release only stable version of tenv to package managers --- .github/workflows/release.yml | 2 +- .goreleaser.yml | 144 ------------------------------ .goreleaser_announce.yml | 16 ---- .goreleaser_release_only.yml | 160 ++++++++++++++++++++++++++++++++++ 4 files changed, 161 insertions(+), 161 deletions(-) delete mode 100644 .goreleaser_announce.yml create mode 100644 .goreleaser_release_only.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b159238..8ed7227 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -65,7 +65,7 @@ jobs: TAG=$(echo $GITHUB_REF | sed 's/refs\/tags\///') if [[ "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then - EXTRA_GORELEASER_COMMANDS="-f .goreleaser_announce.yml ${EXTRA_GORELEASER_COMMANDS}" + EXTRA_GORELEASER_COMMANDS="-f .goreleaser_release_only.yml ${EXTRA_GORELEASER_COMMANDS}" fi echo "EXTRA_GORELEASER_COMMANDS=${EXTRA_GORELEASER_COMMANDS}" >> $GITHUB_OUTPUT diff --git a/.goreleaser.yml b/.goreleaser.yml index 7e970be..1d1004f 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -400,150 +400,6 @@ nfpms: archlinux: pkgbase: tenv packager: tofuutils - -snapcrafts: - - name: tenv - publish: true - summary: OpenTofu, Terraform, Terragrunt, and Atmos version manager, written in Go. - description: | - tenv is a versatile version manager for OpenTofu, Terraform, Terragrunt and Atmos, written in Go. - Our tool simplifies the complexity of handling different versions of these powerful tools, - ensuring developers and DevOps professionals - can focus on what matters most - building and deploying efficiently. - disable: "false" - channel_templates: - - "latest/stable" - grade: "stable" - confinement: strict - license: Apache-2.0 - base: core22 - apps: - tenv: - plugs: ["home", "network", "network-bind"] - command: tenv - aliases: [tenv] - tofu: - plugs: ["home", "network", "network-bind"] - command: tofu - aliases: [tofu] - terraform: - plugs: ["home", "network", "network-bind"] - command: terraform - aliases: [terraform] - terragrunt: - plugs: ["home", "network", "network-bind"] - command: terragrunt - aliases: [terragrunt] - tf: - plugs: ["home", "network", "network-bind"] - command: tf - aliases: [tf] - atmos: - plugs: ["home", "network", "network-bind"] - command: atmos - aliases: [atmos] - -dmg: - - id: tenv - name: "{{.ProjectName}}-{{.Arch}}" - # IDs of the archives to use. - # Empty means all IDs. - ids: [] - use: binary - if: '{{ eq .Os "linux" }}' - goamd64: v1 - extra_files: [] - templated_extra_files: [] - replace: true - mod_timestamp: "{{ .CommitTimestamp }}" - -cloudsmiths: - - organization: tofuutils - repository: tenv - distributions: - deb: "ubuntu/xenial" - alpine: "alpine/v3.8" - rpm: "el/7" - -aurs: - - name: tenv-bin - # Artifact IDs to filter for. - # Empty means all IDs (no filter). - ids: [] - homepage: "https://tofuutils.github.io/tenv/" - description: "OpenTofu, Terraform, Terragrunt, and Atmos version manager, written in Go." - maintainers: - - "Alexander Sharov " - - "chaseme " - contributors: - - "Alexander Sharov " - - "chaseme " - license: "Apache-2.0" - private_key: "{{ .Env.AUR_KEY }}" - git_url: "ssh://aur@aur.archlinux.org/tenv-bin.git" - skip_upload: false - provides: - - atmos - - tenv - - terraform - - terragrunt - - tf - - tofu - conflicts: - - atmos - - atmos-bin - - opentofu - - opentofu-bin - - opentofu-bin-stable - - opentofu-git - - terraform - - terragrunt - - tfenv - - tgenv - - tofuenv - depends: [] - optdepends: - - "cosign: package validation for OpenTofu" - backup: [] - package: |- - # bin - install -Dm 0755 "atmos" "${pkgdir}/usr/bin/atmos" - install -Dm 0755 "tenv" "${pkgdir}/usr/bin/tenv" - install -Dm 0755 "terraform" "${pkgdir}/usr/bin/terraform" - install -Dm 0755 "terragrunt" "${pkgdir}/usr/bin/terragrunt" - install -Dm 0755 "tf" "${pkgdir}/usr/bin/tf" - install -Dm 0755 "tofu" "${pkgdir}/usr/bin/tofu" - - # license - install -Dm 0644 "LICENSE" "${pkgdir}/usr/share/licenses/tenv/LICENSE" - install -Dm 0644 "LICENSE" "${pkgdir}/usr/share/doc/tenv/LICENSE" - - # readme - install -Dm 0644 "README.md" "${pkgdir}/usr/share/doc/tenv/README.md" - - # completions - mkdir -p "${pkgdir}/usr/share/bash-completion/completions/" - mkdir -p "${pkgdir}/usr/share/zsh/site-functions/" - mkdir -p "${pkgdir}/usr/share/fish/vendor_completions.d/" - - for i in bash fish zsh; do - ./tenv completion $i > ./tenv.$i - done - - install -Dm644 "./tenv.bash" "${pkgdir}/usr/share/bash-completion/completions/tenv" - install -Dm644 "./tenv.zsh" "${pkgdir}/usr/share/zsh/site-functions/tenv" - install -Dm644 "./tenv.fish" "${pkgdir}/usr/share/fish/vendor_completions.d/tenv.fish" - commit_author: - name: tofuutils - email: tofuutils@gmail.com - commit_msg_template: "Release tenv {{.Tag}}" - goamd64: v1 - - # Default: 'ssh -i {{ .KeyPath }} -o StrictHostKeyChecking=accept-new -F /dev/null' - # git_ssh_command: "ssh -i {{ .Env.KEY }} -o SomeOption=yes" - - url_template: "https://github.com/tofuutils/tenv/releases/download/{{ .Tag }}/{{ .ArtifactName }}" - directory: "." # chocolateys: # - name: tenv # # Empty means all IDs. diff --git a/.goreleaser_announce.yml b/.goreleaser_announce.yml deleted file mode 100644 index 37bc4ed..0000000 --- a/.goreleaser_announce.yml +++ /dev/null @@ -1,16 +0,0 @@ -announce: - slack: - enabled: true - message_template: ":tada: tenv {{.Tag}} is available! See what's new here - https://github.com/tofuutils/tenv/releases/tag/{{.Tag}}" - channel: "#tofuutils" - username: "tofuutils-notifications" - icon_emoji: "" - icon_url: "" - blocks: [] - attachments: [] - - telegram: - enabled: true - chat_id: -4020097127 - message_template: "🎉 tenv {{ mdv2escape .Tag}} is available{{ mdv2escape '!' }} See what is new here - https://github.com/tofuutils/tenv/releases/tag/{{ mdv2escape .Tag}}" - parse_mode: HTML diff --git a/.goreleaser_release_only.yml b/.goreleaser_release_only.yml new file mode 100644 index 0000000..67864b7 --- /dev/null +++ b/.goreleaser_release_only.yml @@ -0,0 +1,160 @@ +announce: + slack: + enabled: true + message_template: ":tada: tenv {{.Tag}} is available! See what's new here - https://github.com/tofuutils/tenv/releases/tag/{{.Tag}}" + channel: "#tofuutils" + username: "tofuutils-notifications" + icon_emoji: "" + icon_url: "" + blocks: [] + attachments: [] + + telegram: + enabled: true + chat_id: -4020097127 + message_template: "🎉 tenv {{ mdv2escape .Tag}} is available{{ mdv2escape '!' }} See what is new here - https://github.com/tofuutils/tenv/releases/tag/{{ mdv2escape .Tag}}" + parse_mode: HTML + +cloudsmiths: + - organization: tofuutils + repository: tenv + distributions: + deb: "ubuntu/xenial" + alpine: "alpine/v3.8" + rpm: "el/7" + +aurs: + - name: tenv-bin + # Artifact IDs to filter for. + # Empty means all IDs (no filter). + ids: [] + homepage: "https://tofuutils.github.io/tenv/" + description: "OpenTofu, Terraform, Terragrunt, and Atmos version manager, written in Go." + maintainers: + - "Alexander Sharov " + - "chaseme " + contributors: + - "Alexander Sharov " + - "chaseme " + license: "Apache-2.0" + private_key: "{{ .Env.AUR_KEY }}" + git_url: "ssh://aur@aur.archlinux.org/tenv-bin.git" + skip_upload: false + provides: + - atmos + - tenv + - terraform + - terragrunt + - tf + - tofu + conflicts: + - atmos + - atmos-bin + - opentofu + - opentofu-bin + - opentofu-bin-stable + - opentofu-git + - terraform + - terragrunt + - tfenv + - tgenv + - tofuenv + depends: [] + optdepends: + - "cosign: package validation for OpenTofu" + backup: [] + package: |- + # bin + install -Dm 0755 "atmos" "${pkgdir}/usr/bin/atmos" + install -Dm 0755 "tenv" "${pkgdir}/usr/bin/tenv" + install -Dm 0755 "terraform" "${pkgdir}/usr/bin/terraform" + install -Dm 0755 "terragrunt" "${pkgdir}/usr/bin/terragrunt" + install -Dm 0755 "tf" "${pkgdir}/usr/bin/tf" + install -Dm 0755 "tofu" "${pkgdir}/usr/bin/tofu" + + # license + install -Dm 0644 "LICENSE" "${pkgdir}/usr/share/licenses/tenv/LICENSE" + install -Dm 0644 "LICENSE" "${pkgdir}/usr/share/doc/tenv/LICENSE" + + # readme + install -Dm 0644 "README.md" "${pkgdir}/usr/share/doc/tenv/README.md" + + # completions + mkdir -p "${pkgdir}/usr/share/bash-completion/completions/" + mkdir -p "${pkgdir}/usr/share/zsh/site-functions/" + mkdir -p "${pkgdir}/usr/share/fish/vendor_completions.d/" + + for i in bash fish zsh; do + ./tenv completion $i > ./tenv.$i + done + + install -Dm644 "./tenv.bash" "${pkgdir}/usr/share/bash-completion/completions/tenv" + install -Dm644 "./tenv.zsh" "${pkgdir}/usr/share/zsh/site-functions/tenv" + install -Dm644 "./tenv.fish" "${pkgdir}/usr/share/fish/vendor_completions.d/tenv.fish" + commit_author: + name: tofuutils + email: tofuutils@gmail.com + commit_msg_template: "Release tenv {{.Tag}}" + goamd64: v1 + + # Default: 'ssh -i {{ .KeyPath }} -o StrictHostKeyChecking=accept-new -F /dev/null' + # git_ssh_command: "ssh -i {{ .Env.KEY }} -o SomeOption=yes" + + url_template: "https://github.com/tofuutils/tenv/releases/download/{{ .Tag }}/{{ .ArtifactName }}" + directory: "." + +snapcrafts: + - name: tenv + publish: true + summary: OpenTofu, Terraform, Terragrunt, and Atmos version manager, written in Go. + description: | + tenv is a versatile version manager for OpenTofu, Terraform, Terragrunt and Atmos, written in Go. + Our tool simplifies the complexity of handling different versions of these powerful tools, + ensuring developers and DevOps professionals + can focus on what matters most - building and deploying efficiently. + disable: "false" + channel_templates: + - "latest/stable" + grade: "stable" + confinement: strict + license: Apache-2.0 + base: core22 + apps: + tenv: + plugs: ["home", "network", "network-bind"] + command: tenv + aliases: [tenv] + tofu: + plugs: ["home", "network", "network-bind"] + command: tofu + aliases: [tofu] + terraform: + plugs: ["home", "network", "network-bind"] + command: terraform + aliases: [terraform] + terragrunt: + plugs: ["home", "network", "network-bind"] + command: terragrunt + aliases: [terragrunt] + tf: + plugs: ["home", "network", "network-bind"] + command: tf + aliases: [tf] + atmos: + plugs: ["home", "network", "network-bind"] + command: atmos + aliases: [atmos] + +dmg: + - id: tenv + name: "{{.ProjectName}}-{{.Arch}}" + # IDs of the archives to use. + # Empty means all IDs. + ids: [] + use: binary + if: '{{ eq .Os "Darwin" }}' + goamd64: v1 + extra_files: [] + templated_extra_files: [] + replace: true + mod_timestamp: "{{ .CommitTimestamp }}"