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

Enabled prerelease #42

Closed
wants to merge 24 commits into from
Closed
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
38 changes: 38 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,41 @@ jobs:
push: true
cache-from: type=gha
cache-to: type=gha,mode=max

release-assets:
name: Build and release binaries
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
with:
submodules: recursive

- name: Install aqua
uses: aquaproj/aqua-installer@4551ec64e21bf0f557c2525135ff0bd2cba40ec7 # v3.0.0
with:
aqua_version: v2.27.3

- uses: nowsprinting/check-version-format-action@98485692a883d962227b09f40f29a63de0771299 # v4.0.2
id: version
with:
prefix: "v"

- name: Create pre-release
if: steps.version.outputs.is_stable != 'true'
run: gh release create --prerelease --title ${{ github.ref_name }} ${{ github.ref_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create release
if: steps.version.outputs.is_stable == 'true'
run: gh release create --latest --title ${{ github.ref_name }} ${{ github.ref_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Run goreleaser
run: goreleaser release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
tmp
dist
out
.env
# Created by https://www.toptal.com/developers/gitignore/api/go
Expand Down
89 changes: 89 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
version: 1

builds:
- id: unity-meta-check
binary: unity-meta-check
main: ./main.go
env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
- id: unity-meta-check-junit
binary: unity-meta-check-junit
main: ./tool/unity-meta-check-junit
env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
- id: gh-action
binary: gh-action
main: ./tool/gh-action
env:
- CGO_ENABLED=0
goos:
- linux
goarch:
- amd64
- arm64
- id: gh-action-yaml-gen
binary: gh-action-yaml-gen
main: ./tool/gh-action/action-yaml-gen
env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
- id: unity-meta-autofix
binary: unity-meta-autofix
main: ./tool/unity-meta-autofix
env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
- id: unity-meta-check-github-pr-comment
binary: unity-meta-check-github-pr-comment
main: ./tool/unity-meta-check-github-pr-comment
env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64

archives:
- format: binary
name_template: >-
{{ .Binary }}-
{{- if eq .Os "Darwin" }}darwin-
{{- else if eq .Os "Linux" }}linux-
{{- else }}{{ .Os }}{{ end }}-{{ .Arch }}
# https://goreleaser.com/errors/multiple-binaries-archive/
allow_different_binary_count: true

checksum:
name_template: "checksums.txt"

release:
prerelease: auto
14 changes: 14 additions & 0 deletions aqua.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
# aqua - Declarative CLI Version Manager
# https://aquaproj.github.io/
# checksum:
# enabled: true
# require_checksum: true
# supported_envs:
# - all
registries:
- type: standard
ref: v4.166.0 # renovate: depName=aquaproj/aqua-registry
packages:
- name: goreleaser/goreleaser@v1.25.1
- name: cli/cli@v2.49.1