Skip to content

Commit

Permalink
change to tag creation on github
Browse files Browse the repository at this point in the history
  • Loading branch information
fredcarle committed Nov 15, 2023
1 parent 70e3267 commit 46e0373
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 15 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -28,13 +28,18 @@ 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
with:
go-version: "1.20"
check-latest: true

- name: Apply tag
run: git tag ${{ github.event.inputs.tag }}

- name: Build modules
run: make deps:modules

Expand Down
22 changes: 12 additions & 10 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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 [email protected] 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 [email protected] or join our Discord at https://discord.source.network/.
name_template: "v{{ .Version }} Release"

changelog:
sort: asc
abbrev: -1
groups:
- title: Features
regexp: '^feat:.*'
Expand All @@ -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 }}"
Expand Down

0 comments on commit 46e0373

Please sign in to comment.