-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ci): add release when tagging (#14)
* feat(ci): add release when tagging Signed-off-by: Felipe Zipitria <[email protected]>
- Loading branch information
Showing
3 changed files
with
175 additions
and
0 deletions.
There are no files selected for viewing
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,47 @@ | ||
# For most projects, this workflow file will not need changing; you simply need | ||
# to commit it to your repository. | ||
# | ||
# You may wish to alter this file to override the set of languages analyzed, | ||
# or to provide custom queries or build logic. | ||
# | ||
# ******** NOTE ******** | ||
# We have attempted to detect the languages in your repository. Please check | ||
# the `language` matrix defined below to confirm you have the correct set of | ||
# supported CodeQL languages. | ||
# | ||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches: [ main, develop ] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [ main, develop ] | ||
schedule: | ||
- cron: '33 8 * * 4' | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: [ 'go' ] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v2 | ||
with: | ||
languages: ${{ matrix.language }} | ||
|
||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v2 | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 |
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,39 @@ | ||
name: goreleaser | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- | ||
name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: ^1.19 | ||
cache: true | ||
- | ||
name: Login to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- | ||
name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v3 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
version: latest | ||
args: release --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
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,89 @@ | ||
# This is an example .goreleaser.yml file with some sane defaults. | ||
# Make sure to check the documentation at http://goreleaser.com | ||
project_name: crs-toolchain | ||
before: | ||
hooks: | ||
# You may remove this if you don't use go modules. | ||
- go mod download | ||
builds: | ||
- id: "crs-toolchain" | ||
env: | ||
- CGO_ENABLED=0 | ||
binary: crs-toolchain | ||
targets: | ||
- linux_amd64 | ||
- linux_arm64 | ||
- darwin_amd64 | ||
- darwin_arm64 | ||
- windows_amd64 | ||
archives: | ||
- format_overrides: | ||
- goos: windows | ||
format: zip | ||
checksum: | ||
name_template: '{{ .ProjectName }}-checksums.txt' | ||
snapshot: | ||
name_template: "{{ .Tag }}-next" | ||
changelog: | ||
sort: asc | ||
use: github | ||
groups: | ||
- title: Features | ||
regexp: "^.*feat[(\\w)]*:+.*$" | ||
order: 0 | ||
- title: 'Bug fixes' | ||
regexp: "^.*fix[(\\w)]*:+.*$" | ||
order: 1 | ||
- title: Others | ||
order: 999 | ||
filters: | ||
exclude: | ||
- '^docs' | ||
- '^test' | ||
release: | ||
prerelease: auto | ||
dockers: | ||
- image_templates: | ||
- "ghcr.io/theseion/crs-toolchain:{{ .Version }}-amd64" | ||
use: buildx | ||
goarch: amd64 | ||
build_flag_templates: | ||
- "--platform=linux/amd64" | ||
- image_templates: | ||
- "ghcr.io/theseion/crs-toolchain:{{ .Version }}-arm64" | ||
use: buildx | ||
goarch: arm64 | ||
build_flag_templates: | ||
- "--platform=linux/arm64" | ||
docker_manifests: | ||
- name_template: "ghcr.io/theseion/crs-toolchain:latest" | ||
image_templates: | ||
- "ghcr.io/theseion/crs-toolchain:{{ .Version }}-amd64" | ||
- "ghcr.io/theseion/crs-toolchain:{{ .Version }}-arm64" | ||
- name_template: "ghcr.io/theseion/crs-toolchain:{{ .Version }}" | ||
image_templates: | ||
- "ghcr.io/theseion/crs-toolchain:{{ .Version }}-amd64" | ||
- "ghcr.io/theseion/crs-toolchain:{{ .Version }}-arm64" | ||
nfpms: | ||
- id: "crs-toolchain" | ||
builds: ["crs-toolchain"] | ||
formats: | ||
- deb | ||
- rpm | ||
bindir: /usr/bin | ||
overrides: | ||
rpm: | ||
replacements: | ||
amd64: x86_64 | ||
file_name_template: "{{ .ProjectName }}-{{ .Version }}.{{ .Arch }}" | ||
deb: | ||
file_name_template: "{{ .ProjectName }}-{{ .Version }}_{{ .Arch }}" | ||
vendor: | ||
homepage: https://github.com/theseion/crs-toolchain | ||
maintainer: [email protected] | ||
description: | ||
CRS ToolChain helper | ||
|
||
license: APL2 | ||
|
||
|