Skip to content

Commit 00b91e2

Browse files
authored
Merge pull request #38 from smallstep/max/release
[action] modify test workflow and add release workflow
2 parents 31cf01b + 21a4877 commit 00b91e2

File tree

10 files changed

+186
-47
lines changed

10 files changed

+186
-47
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: Bug Report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: bug, needs triage
6+
assignees: ''
7+
8+
---
9+
10+
### Subject of the issue
11+
Describe your issue here.
12+
13+
### Your environment
14+
* OS -
15+
* Version -
16+
17+
### Steps to reproduce
18+
Tell us how to reproduce this issue. Please provide a working demo, you can use [this template](https://plnkr.co/edit/XorWgI?p=preview) as a base.
19+
20+
### Expected behaviour
21+
Tell us what should happen
22+
23+
### Actual behaviour
24+
Tell us what happens instead
25+
26+
### Additional context
27+
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: Ask on Discord
4+
url: https://discord.gg/7xgjhVAg6g
5+
about: You can ask for help here!
6+
- name: Want to contribute to step crypto?
7+
url: https://github.com/smallstep/cli/blob/master/docs/CONTRIBUTING.md
8+
about: Be sure to read contributing guidelines!
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
name: Documentation Request
3+
about: Request documentation for a feature
4+
title: ''
5+
labels: docs, needs triage
6+
assignees: ''
7+
8+
---
9+
10+
<!---
11+
Tell us which feature you'd like to see documented.
12+
- Where would you like that documentation to live (command line usage output, website, github markdown on the repo)?
13+
- If there are specific attributes or options you'd like to see documented, please include those in the request.
14+
-->
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
name: Enhancement
3+
about: Suggest an enhancement to step crypto
4+
title: ''
5+
labels: enhancement, needs triage
6+
assignees: ''
7+
8+
---
9+
10+
### What would you like to be added
11+
12+
13+
### Why this is needed

.github/PULL_REQUEST_TEMPLATE

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
### Description
2+
Please describe your pull request.
3+
4+
💔Thank you!

.github/labeler.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
needs triage:
2+
- '**' # index.php | src/main.php
3+
- '.*' # .gitignore
4+
- '.*/**' # .github/workflows/label.yml

.github/workflows/go.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.

.github/workflows/labeler.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Pull Request Labeler
2+
on:
3+
pull_request_target
4+
5+
jobs:
6+
label:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/[email protected]
10+
with:
11+
repo-token: "${{ secrets.GITHUB_TOKEN }}"

.github/workflows/release.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Create Release
2+
3+
on:
4+
push:
5+
# Sequence of patterns matched against refs/tags
6+
tags:
7+
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
8+
9+
jobs:
10+
test:
11+
name: Lint, Test, Build
12+
runs-on: ubuntu-20.04
13+
strategy:
14+
matrix:
15+
go: [ '1.16', '1.17' ]
16+
steps:
17+
-
18+
name: Checkout
19+
uses: actions/checkout@v2
20+
-
21+
name: Setup Go
22+
uses: actions/setup-go@v2
23+
with:
24+
go-version: ${{ matrix.go }}
25+
-
26+
name: golangci-lint
27+
uses: golangci/golangci-lint-action@v2
28+
with:
29+
version: 'v1.44.0'
30+
args: --timeout=30m
31+
-
32+
name: Test, Build
33+
id: lintTestBuild
34+
run: V=1 make
35+
36+
create_release:
37+
name: Create Release
38+
needs: test
39+
runs-on: ubuntu-20.04
40+
steps:
41+
-
42+
name: Is Pre-release
43+
id: is_prerelease
44+
run: |
45+
set +e
46+
echo ${{ github.ref }} | grep "\-rc.*"
47+
OUT=$?
48+
if [ $OUT -eq 0 ]; then IS_PRERELEASE=true; else IS_PRERELEASE=false; fi
49+
echo "::set-output name=IS_PRERELEASE::${IS_PRERELEASE}"
50+
-
51+
name: Create Release
52+
id: create_release
53+
uses: actions/create-release@v1
54+
env:
55+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56+
with:
57+
tag_name: ${{ github.ref }}
58+
release_name: Release ${{ github.ref }}
59+
draft: false
60+
prerelease: ${{ steps.is_prerelease.outputs.IS_PRERELEASE }}

.github/workflows/test.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
tags-ignore:
6+
- 'v*'
7+
branches:
8+
- "**"
9+
pull_request:
10+
11+
jobs:
12+
lintTestBuild:
13+
name: Lint, Test, Build
14+
runs-on: ubuntu-20.04
15+
strategy:
16+
matrix:
17+
go: [ '1.16', '1.17' ]
18+
steps:
19+
-
20+
name: Checkout
21+
uses: actions/checkout@v2
22+
-
23+
name: Setup Go
24+
uses: actions/setup-go@v2
25+
with:
26+
go-version: ${{ matrix.go }}
27+
-
28+
name: golangci-lint
29+
uses: golangci/golangci-lint-action@v2
30+
with:
31+
version: 'v1.44.0'
32+
args: --timeout=30m
33+
-
34+
name: Test, Build
35+
id: lintTestBuild
36+
run: V=1 make
37+
-
38+
name: Codecov
39+
uses: codecov/[email protected]
40+
if: matrix.go == '1.17'
41+
with:
42+
file: ./coverage.out
43+
name: codecov-umbrella
44+
fail_ci_if_error: true
45+

0 commit comments

Comments
 (0)