From 46e0373e4ee3608cdb32d7c1441680f28c960fe8 Mon Sep 17 00:00:00 2001 From: Fred Carle Date: Tue, 14 Nov 2023 23:12:42 -0500 Subject: [PATCH] change to tag creation on github --- .github/workflows/release.yml | 15 ++++++++++----- .goreleaser.yaml | 22 ++++++++++++---------- 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d0edf94a8d..7d226a19fc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,14 +8,14 @@ # by the Apache License, Version 2.0, included in the file # licenses/APL.txt. -# This workflow builds the AMI using packer, if the build is successfull -# then it will deploy the AMI using terraform apply, onto AWS. name: Release workflow on: - push: - tags: - - 'v[0-9]+.[0-9]+.[0-9]+' + workflow_dispatch: + inputs: + tag: + description: 'New tag name' + required: true permissions: contents: write @@ -28,6 +28,8 @@ jobs: steps: - name: Checkout code into the directory uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: Setup Go environment explicitly uses: actions/setup-go@v3 @@ -35,6 +37,9 @@ jobs: go-version: "1.20" check-latest: true + - name: Apply tag + run: git tag ${{ github.event.inputs.tag }} + - name: Build modules run: make deps:modules diff --git a/.goreleaser.yaml b/.goreleaser.yaml index caad5a551b..4304075c08 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -22,8 +22,8 @@ builds: goarch: - amd64 - arm64 - - - id: "defradb_pg" + # A build with the playground included. + - id: "defradb_playground" main: ./cmd/defradb flags: - -tags=playground @@ -36,12 +36,12 @@ builds: - arm64 archives: - - id: defradb_pg + - id: defradb_playground builds: - - defradb_pg + - defradb_playground format: binary # this name template makes the OS and Arch compatible with the results of `uname`. - name_template: '{{ .Binary }}+pg_{{ .Version }}_{{ .Os }}_{{- if eq .Arch "amd64" }}x86_64{{- else }}{{ .Arch }}{{ end }}{{- if .Arm }}v{{ .Arm }}{{ end }}' + name_template: '{{ .Binary }}_playground_{{ .Version }}_{{ .Os }}_{{- if eq .Arch "amd64" }}x86_64{{- else }}{{ .Arch }}{{ end }}{{- if .Arm }}v{{ .Arm }}{{ end }}' - id: defradb builds: - defradb @@ -50,14 +50,16 @@ archives: name_template: '{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{- if eq .Arch "amd64" }}x86_64{{- else }}{{ .Arch }}{{ end }}{{- if .Arm }}v{{ .Arm }}{{ end }}' release: + target_commitish: '{{ .Commit }}' header: | - DefraDB v0.8 is a major pre-production release. Until the stable version 1.0 is reached, the SemVer minor patch number will denote notable releases, which will give the project freedom to experiment and explore potentially breaking changes. + DefraDB v{{ .Major }}.{{ .Minor }} is a major pre-production release. Until the stable version 1.0 is reached, the SemVer minor patch number will denote notable releases, which will give the project freedom to experiment and explore potentially breaking changes. - To get a full outline of the changes, we invite you to review the official changelog below. This release does include a Breaking Change to existing v0.7.x databases. If you need help migrating an existing deployment, reach out at hello@source.network or join our Discord at https://discord.source.network/. + To get a full outline of the changes, we invite you to review the official changelog below. This release does include a Breaking Change to existing v{{ .Major }}.{{ .Minor }}.x databases. If you need help migrating an existing deployment, reach out at hello@source.network or join our Discord at https://discord.source.network/. name_template: "v{{ .Version }} Release" changelog: sort: asc + abbrev: -1 groups: - title: Features regexp: '^feat:.*' @@ -83,12 +85,12 @@ source: milestones: - close: true - fail_on_error: true - name_template: "DefraDB v0.8" + fail_on_error: false + name_template: "DefraDB v{{ .Major }}.{{ .Minor }}" dockers: - ids: - - "defradb_pg" + - "defradb_playground" image_templates: - "{{ .Env.GITHUB_REPOSITORY }}:latest" - "{{ .Env.GITHUB_REPOSITORY }}:{{ .Version }}"