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

Fixed goreleaser #185

Merged
merged 1 commit into from
Jun 3, 2024
Merged
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
9 changes: 9 additions & 0 deletions .github/RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## What's Changed
-
-


## New Contributors

-
-
49 changes: 20 additions & 29 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,32 @@ name: goreleaser
on:
push:
tags:
- '*'
- '**'
permissions:
contents: write

jobs:
goreleaser:

runs-on: ubuntu-latest

steps:
-
name: GCC multilib
run: |
sudo apt-get update
sudo apt-get install gcc-multilib g++-multilib clang

-
name: OSXCross for CGO Support
run: |
mkdir ../../osxcross
git clone https://github.com/likhita-809/osxcross-target.git ../../osxcross/target
sudo ln -s /home/runner/work/osxcross/target/target/lib/libcrypto.so.1.0.0 /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
-
name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v3
- name: Check out repo code
uses: actions/checkout@v4
with:
go-version: 1.19
-
name: Run GoReleaser
uses: goreleaser/[email protected]
fetch-depth: 0
ref: ${{ github.event.inputs.release_tag }}

- name: Setup go env
uses: actions/setup-go@v5
with:
go-version: "1.20"

- name: Set wasm env version
run: echo "COSMWASM_VERSION=$(go list -m github.com/CosmWasm/wasmvm | sed 's/.* //')" >> $GITHUB_ENV

- name: Release
uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: release --rm-dist
args: release --clean --release-notes ./RELEASE_NOTES.md
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
87 changes: 87 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
project_name: passage

env:
- CGO_ENABLED=1

builds:
- id: passage-linux-amd64
main: ./cmd/passage
binary: passage
hooks:
pre:
- sudo wget https://github.com/CosmWasm/wasmvm/releases/download/{{ .Env.COSMWASM_VERSION }}/libwasmvm_muslc.x86_64.a -O /usr/lib/x86_64-linux-gnu/libwasmvm_muslc.a
goos:
- linux
goarch:
- amd64
env:
- CC=x86_64-linux-gnu-gcc
flags:
- -mod=readonly
- -trimpath
ldflags:
- -X github.com/cosmos/cosmos-sdk/version.Name=passage
- -X github.com/cosmos/cosmos-sdk/version.AppName=passage
- -X github.com/cosmos/cosmos-sdk/version.Version={{ .Version }}
- -X github.com/cosmos/cosmos-sdk/version.Commit={{ .Commit }}
- -X github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger,muslc,osusergo
- -w -s
- -linkmode=external
- -extldflags '-Wl,-z,muldefs -static -lm'
tags:
- netgo
- ledger
- muslc
- osusergo

archives:
- id: zipped
builds:
- passage-linux-amd64
name_template: "{{.ProjectName}}-{{ .Version }}-{{ .Os }}-{{ .Arch }}"
format: tar.gz
files:
- none*
- id: binaries
builds:
- passage-linux-amd64
name_template: "{{.ProjectName}}-{{ .Version }}-{{ .Os }}-{{ .Arch }}"
format: binary
files:
- none*

checksum:
name_template: "sha256sum.txt"
algorithm: sha256

# Docs: https://goreleaser.com/customization/changelog/
changelog:
skip : true

# Docs: https://goreleaser.com/customization/release/
release:
github:
owner: envadiv
name: Passage3D
replace_existing_draft: true
header: |

Binaries for Linux amd64 are available below.

name_template: "Passage3D v{{.Version}} "
mode: replace
draft: false

# Docs: https://goreleaser.com/customization/announce/
# We could automatically announce the release in
# - discord
# - slack
# - twitter
# - webhooks
# - telegram
# - reddit
#
# announce:
# discord:
# enabled: true
# message_template: 'New {{.Tag}} is out!'
Loading