mirror of
https://github.com/wealdtech/ethdo.git
synced 2026-01-09 22:18:01 -05:00
Compare commits
2 Commits
v1.5.0-bet
...
v1.5.0-bet
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
44478e147e | ||
|
|
61b73b0f61 |
@@ -1,8 +1,7 @@
|
||||
name: Go
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
# branches: [ master ]
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
@@ -29,12 +28,6 @@ jobs:
|
||||
dep ensure
|
||||
fi
|
||||
|
||||
- name: Build
|
||||
run: go build -v .
|
||||
|
||||
- name: Test
|
||||
run: go test -v .
|
||||
|
||||
- name: Set env
|
||||
run: |
|
||||
echo '::set-env name=GO111MODULE::on'
|
||||
@@ -49,6 +42,12 @@ jobs:
|
||||
echo "::set-env name=RELEASE_VERSION::${RELEASE_VERSION}"
|
||||
echo "::set-output name=RELEASE_VERSION::${RELEASE_VERSION}"
|
||||
|
||||
- name: Build
|
||||
run: go build -v -ldflags="-X cmd.ReleaseVersion=${RELEASE_VERSION}" .
|
||||
|
||||
- name: Test
|
||||
run: go test -v .
|
||||
|
||||
- name: Fetch xgo
|
||||
run: |
|
||||
go get github.com/suburbandad/xgo
|
||||
@@ -71,7 +70,7 @@ jobs:
|
||||
mv ethdo-linux-arm64 ethdo
|
||||
tar zcf ethdo-${RELEASE_VERSION}-linux-arm64.tar.gz ethdo
|
||||
|
||||
- name: Create release
|
||||
- name: Create draft release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
@@ -80,7 +79,7 @@ jobs:
|
||||
tag_name: ${{ github.ref }}
|
||||
release_name: Release ${{ env.RELEASE_VERSION }}
|
||||
draft: true
|
||||
prerelease: true
|
||||
prerelease: false
|
||||
|
||||
- name: Upload windows zip file
|
||||
id: upload-release-asset-windows
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright © 2019 Weald Technology Trading
|
||||
// Copyright © 2019, 2020 Weald Technology Trading
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
@@ -22,15 +22,17 @@ import (
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
var ReleaseVersion = "local build"
|
||||
|
||||
// versionCmd represents the version command
|
||||
var versionCmd = &cobra.Command{
|
||||
Use: "version",
|
||||
Short: "Version of Ethdo",
|
||||
Long: `Obtain the version of Ethdo. For example:
|
||||
Short: "Version of ethdo",
|
||||
Long: `Obtain the version of ethdo. For example:
|
||||
|
||||
ethdo version.`,
|
||||
ethdo version`,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
fmt.Println("1.5.0-prerelease")
|
||||
fmt.Println(ReleaseVersion)
|
||||
if viper.GetBool("verbose") {
|
||||
buildInfo, ok := dbg.ReadBuildInfo()
|
||||
if ok {
|
||||
|
||||
Reference in New Issue
Block a user