[actions] renaming jobs and setting up docker job

pull/485/head v0.15.9-rc6
max furman 3 years ago
parent 036c3d8d51
commit 2c495a347f

@ -7,7 +7,7 @@ on:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
jobs: jobs:
lint_test_build: test:
name: Lint, Test, Build name: Lint, Test, Build
runs-on: ubuntu-latest runs-on: ubuntu-latest
outputs: outputs:
@ -27,7 +27,7 @@ jobs:
run: sudo apt-get -y install libpcsclite-dev run: sudo apt-get -y install libpcsclite-dev
- -
name: Lint, Test, Build name: Lint, Test, Build
id: lintTestBuild id: lint_test_build
run: V=1 make -j1 bootstrap travis run: V=1 make -j1 bootstrap travis
- -
name: Is Pre-release name: Is Pre-release
@ -39,10 +39,10 @@ jobs:
if [ $OUT -eq 0 ]; then IS_PRERELEASE=true; else IS_PRERELEASE=false; fi if [ $OUT -eq 0 ]; then IS_PRERELEASE=true; else IS_PRERELEASE=false; fi
echo "::set-output name=IS_PRERELEASE::${IS_PRERELEASE}" echo "::set-output name=IS_PRERELEASE::${IS_PRERELEASE}"
build_upload_github_assets: release:
name: Build & Upload Mac OS | Linux | Windows Assets To Github Release name: Create Release & Upload Assets
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: lint_test_build needs: test
steps: steps:
- -
name: Checkout name: Checkout
@ -63,27 +63,27 @@ jobs:
env: env:
GITHUB_TOKEN: ${{ secrets.PAT }} GITHUB_TOKEN: ${{ secrets.PAT }}
# build_upload_docker: build_upload_docker:
# name: Build & Upload Docker Images name: Build & Upload Docker Images
# runs-on: ubuntu-latest runs-on: ubuntu-latest
# needs: create_release needs: release
# if: needs.create_release.outputs.is_prerelease == 'false' if: needs.test.outputs.is_prerelease == 'false'
# steps: steps:
# - name: Checkout - name: Checkout
# uses: actions/checkout@v2 uses: actions/checkout@v2
# - name: Setup Go - name: Setup Go
# uses: actions/setup-go@v2 uses: actions/setup-go@v2
# with: with:
# go-version: '^1.15.6' go-version: '^1.15.6'
# - name: Build - name: Build
# id: build id: build
# run: | run: |
# PATH=$PATH:/usr/local/go/bin:/home/admin/go/bin PATH=$PATH:/usr/local/go/bin:/home/admin/go/bin
# make docker-artifacts make docker-artifacts
# env: env:
# DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
# DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
#
# build_upload_aws_s3_binaries: # build_upload_aws_s3_binaries:
# name: Build & Upload AWS S3 Binaries # name: Build & Upload AWS S3 Binaries
# runs-on: ubuntu-latest # runs-on: ubuntu-latest

@ -5,7 +5,6 @@ before:
hooks: hooks:
# You may remove this if you don't use go modules. # You may remove this if you don't use go modules.
- go mod download - go mod download
# - go generate ./...
builds: builds:
- -
id: step-ca id: step-ca
@ -24,7 +23,7 @@ builds:
flags: flags:
- -trimpath - -trimpath
main: ./cmd/step-ca/main.go main: ./cmd/step-ca/main.go
binary: bin/step binary: bin/step-ca
ldflags: ldflags:
- -w -X main.Version={{.Version}} -X main.BuildTime={{.Date}} - -w -X main.Version={{.Version}} -X main.BuildTime={{.Date}}
- -
@ -124,41 +123,42 @@ release:
# - glob: ./path/to/file.txt # - glob: ./path/to/file.txt
# - glob: ./glob/**/to/**/file/**/* # - glob: ./glob/**/to/**/file/**/*
# - glob: ./glob/foo/to/bar/file/foobar/override_from_previous # - glob: ./glob/foo/to/bar/file/foobar/override_from_previous
scoop:
# Template for the url which is determined by the given Token (github or gitlab)
# Default for github is "https://github.com/<repo_owner>/<repo_name>/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
# Default for gitlab is "https://gitlab.com/<repo_owner>/<repo_name>/uploads/{{ .ArtifactUploadHash }}/{{ .ArtifactName }}"
# Default for gitea is "https://gitea.com/<repo_owner>/<repo_name>/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
url_template: "http://github.com/smallstep/certificates/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
# Repository to push the app manifest to. #scoop:
bucket: # # Template for the url which is determined by the given Token (github or gitlab)
owner: smallstep # # Default for github is "https://github.com/<repo_owner>/<repo_name>/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
name: scoop-bucket # # Default for gitlab is "https://gitlab.com/<repo_owner>/<repo_name>/uploads/{{ .ArtifactUploadHash }}/{{ .ArtifactName }}"
# # Default for gitea is "https://gitea.com/<repo_owner>/<repo_name>/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
# Git author used to commit to the repository. # url_template: "http://github.com/smallstep/certificates/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
# Defaults are shown. #
commit_author: # # Repository to push the app manifest to.
name: goreleaserbot # bucket:
email: goreleaser@smallstep.com # owner: smallstep
# name: scoop-bucket
# The project name and current git tag are used in the format string. #
commit_msg_template: "Scoop update for {{ .ProjectName }} version {{ .Tag }}" # # Git author used to commit to the repository.
# # Defaults are shown.
# Your app's homepage. # commit_author:
# Default is empty. # name: goreleaserbot
homepage: "https://smallstep.com/docs/step-ca" # email: goreleaser@smallstep.com
#
# Skip uploads for prerelease. # # The project name and current git tag are used in the format string.
skip_upload: auto # commit_msg_template: "Scoop update for {{ .ProjectName }} version {{ .Tag }}"
#
# Your app's description. # # Your app's homepage.
# Default is empty. # # Default is empty.
description: "A private certificate authority (X.509 & SSH) & ACME server for secure automated certificate management, so you can use TLS everywhere & SSO for SSH." # homepage: "https://smallstep.com/docs/step-ca"
#
# Your app's license # # Skip uploads for prerelease.
# Default is empty. # skip_upload: auto
license: "Apache-2.0" #
# # Your app's description.
# # Default is empty.
# description: "A private certificate authority (X.509 & SSH) & ACME server for secure automated certificate management, so you can use TLS everywhere & SSO for SSH."
#
# # Your app's license
# # Default is empty.
# license: "Apache-2.0"
#dockers: #dockers:
# - dockerfile: docker/Dockerfile # - dockerfile: docker/Dockerfile

@ -266,39 +266,11 @@ bundle-darwin: binary-darwin
.PHONY: binary-linux binary-darwin bundle-linux bundle-darwin .PHONY: binary-linux binary-darwin bundle-linux bundle-darwin
#################################################
# Targets for creating OS specific artifacts and archives
#################################################
artifacts-linux-tag: bundle-linux debian
artifacts-darwin-tag: bundle-darwin
artifacts-archive-tag:
$Q mkdir -p $(RELEASE)
$Q git archive v$(VERSION) | gzip > $(RELEASE)/step-certificates_$(VERSION).tar.gz
artifacts-tag: artifacts-linux-tag artifacts-darwin-tag artifacts-archive-tag
.PHONY: artifacts-linux-tag artifacts-darwin-tag artifacts-archive-tag artifacts-tag
################################################# #################################################
# Targets for creating step artifacts # Targets for creating step artifacts
################################################# #################################################
# For all builds that are not tagged and not on the master branch
artifacts-branch:
# For all builds that are not tagged
artifacts-master:
# For all builds with a release-candidate (-rc) tag
artifacts-release-candidate: artifacts-tag
# For all builds with a release tag
artifacts-release: artifacts-tag
# This command is called by travis directly *after* a successful build # This command is called by travis directly *after* a successful build
artifacts: artifacts-$(PUSHTYPE) docker-$(PUSHTYPE) docker-artifacts: docker-$(PUSHTYPE)
.PHONY: artifacts-master artifacts-release-candidate artifacts-release artifacts .PHONY: docker-artifacts

Loading…
Cancel
Save