forked from sourcenetwork/defradb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
179 additions
and
134 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Copyright 2023 Democratized Data Foundation | ||
# | ||
# Use of this software is governed by the Business Source License | ||
# included in the file licenses/BSL.txt. | ||
# | ||
# As of the Change Date specified in that file, in accordance with | ||
# the Business Source License, use of this software will be governed | ||
# 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: | ||
branches: | ||
- master | ||
|
||
permissions: | ||
contents: write | ||
packages: write | ||
issues: write | ||
|
||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code into the directory | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Go environment explicitly | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: "1.20" | ||
check-latest: true | ||
|
||
- name: Build modules | ||
run: make deps:modules | ||
|
||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v5 | ||
with: | ||
distribution: goreleaser-pro | ||
version: latest | ||
args: release --clean | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GITHUB_REPOSITORY: ${{ github.repository }} | ||
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
version: 1 | ||
|
||
dist: ./build | ||
|
||
before: | ||
hooks: | ||
- go mod tidy | ||
- make deps:playground | ||
|
||
after: | ||
hooks: | ||
- cmd: docker pull {{ .Env.GITHUB_REPOSITORY }}:latest | ||
- cmd: docker run --rm {{ .Env.GITHUB_REPOSITORY }}:latest | ||
|
||
builds: | ||
- id: "defradb" | ||
main: ./cmd/defradb | ||
env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- linux | ||
- windows | ||
- darwin | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
|
||
- id: "defradb+pg" | ||
main: ./cmd/defradb | ||
env: | ||
- CGO_ENABLED=0 | ||
flags: | ||
- -tags=playground | ||
goos: | ||
- linux | ||
- windows | ||
- darwin | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
|
||
|
||
archives: | ||
- id: defradb+pg | ||
builds: | ||
- defradb+pg | ||
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 }}' | ||
- id: defradb | ||
builds: | ||
- defradb | ||
format: binary | ||
# this name template makes the OS and Arch compatible with the results of `uname`. | ||
name_template: '{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{- if eq .Arch "amd64" }}x86_64{{- else }}{{ .Arch }}{{ end }}{{- if .Arm }}v{{ .Arm }}{{ end }}' | ||
|
||
|
||
release: | ||
github: | ||
owner: fredcarle | ||
name: defradb | ||
draft: true | ||
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. | ||
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/. | ||
name_template: "v{{.Version}} Release" | ||
|
||
changelog: | ||
# skip: true | ||
sort: asc | ||
groups: | ||
- title: Features | ||
regexp: '^feat:.*' | ||
order: 0 | ||
- title: Fix | ||
regexp: '^fix:.*' | ||
order: 1 | ||
- title: Tooling | ||
regexp: '^tools:.*' | ||
order: 2 | ||
- title: Documentation | ||
regexp: '^docs:.*' | ||
order: 3 | ||
- title: Refactoring | ||
regexp: '^refactor:.*' | ||
order: 4 | ||
- title: Testing | ||
regexp: '^test:.*' | ||
order: 5 | ||
|
||
source: | ||
enabled: true | ||
|
||
dockers: | ||
- ids: | ||
- "defradb+pg" | ||
image_templates: | ||
- "{{ .Env.GITHUB_REPOSITORY }}:latest" | ||
- "{{ .Env.GITHUB_REPOSITORY }}:{{ .Version }}" | ||
# - "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}:{{ .Version }}" | ||
build_flag_templates: | ||
- "--pull" | ||
- "--label=org.opencontainers.image.description=DefraDB is a Peer-to-Peer Edge Database." | ||
- "--label=org.opencontainers.image.created={{.Date}}" | ||
- "--label=org.opencontainers.image.name={{.ProjectName}}" | ||
- "--label=org.opencontainers.image.revision={{.FullCommit}}" | ||
- "--label=org.opencontainers.image.version={{.Version}}" | ||
- "--label=org.opencontainers.image.source={{.GitURL}}" | ||
- "--platform=linux/amd64" | ||
dockerfile: "{{ .Env.DOCKERFILE }}" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# syntax=docker/dockerfile:1 | ||
|
||
# An image to run defradb. | ||
|
||
# Stage: RUN | ||
FROM debian:bookworm-slim | ||
COPY defradb /defradb | ||
|
||
# Documents which ports are normally used. | ||
# To publish the ports: `docker run -p 9181:9181` ... | ||
EXPOSE 9161 | ||
EXPOSE 9171 | ||
EXPOSE 9181 | ||
|
||
# Default command provided for convenience. | ||
# e.g. docker run -p 9181:9181 source/defradb start --url 0.0.0.0:9181 | ||
ENTRYPOINT [ "/defradb" ] |