Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prerelease fixes #1254

Merged
merged 7 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ jobs:
uses: smallstep/workflows/.github/workflows/goreleaser.yml@main
with:
enable-packages-upload: true
is-prerelease: ${{ needs.create_release.outputs.is_prerelease == 'true' }}
secrets: inherit

build_upload_docker:
Expand Down
3 changes: 2 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ before:

after:
hooks:
# This script depends on IS_PRERELEASE env being set. This is set by CI in the Is Pre-release step.
- cmd: bash scripts/package-repo-import.sh {{ .Var.packageName }} {{ .Version }}
output: true

Expand Down Expand Up @@ -94,6 +95,7 @@ nfpms:
# Package metadata: dpkg --info dist/step_....deb
#
- &NFPM
id: packages
builds:
- nfpm
package_name: "{{ .Var.packageName }}"
Expand Down Expand Up @@ -161,7 +163,6 @@ publishers:
ids:
- packages
cmd: ./scripts/package-upload.sh {{ abs .ArtifactPath }} {{ .Var.packageName }} {{ .Version }} {{ .Var.packageRelease }}
disable: "{{ if .Prerelease }}true{{ end }}"

snapshot:
name_template: "{{ .Tag }}-next"
Expand Down
4 changes: 2 additions & 2 deletions scripts/package-repo-import.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ check_package() {
fi
}

if [[ ${GORELEASER_PHASE} != "publish" ]]; then
echo "Skipping artifact import; GORELEASER_PHASE is not 'publish'"
if [[ ${IS_PRERELEASE} == "true" ]]; then
echo "Skipping artifact import; IS_PRERELEASE is 'true'"
exit 0;
fi

Expand Down