Skip to content

Commit

Permalink
Merge pull request #38 from smallstep/max/release
Browse files Browse the repository at this point in the history
[action] modify test workflow and add release workflow
  • Loading branch information
dopey committed Mar 11, 2022
2 parents 31cf01b + 21a4877 commit 00b91e2
Show file tree
Hide file tree
Showing 10 changed files with 186 additions and 47 deletions.
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: Bug Report
about: Create a report to help us improve
title: ''
labels: bug, needs triage
assignees: ''

---

### Subject of the issue
Describe your issue here.

### Your environment
* OS -
* Version -

### Steps to reproduce
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.

### Expected behaviour
Tell us what should happen

### Actual behaviour
Tell us what happens instead

### Additional context
Add any other context about the problem here.
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: true
contact_links:
- name: Ask on Discord
url: https://discord.gg/7xgjhVAg6g
about: You can ask for help here!
- name: Want to contribute to step crypto?
url: https://github.com/smallstep/cli/blob/master/docs/CONTRIBUTING.md
about: Be sure to read contributing guidelines!
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Documentation Request
about: Request documentation for a feature
title: ''
labels: docs, needs triage
assignees: ''

---

<!---
Tell us which feature you'd like to see documented.
- Where would you like that documentation to live (command line usage output, website, github markdown on the repo)?
- If there are specific attributes or options you'd like to see documented, please include those in the request.
-->
13 changes: 13 additions & 0 deletions .github/ISSUE_TEMPLATE/enhancement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
name: Enhancement
about: Suggest an enhancement to step crypto
title: ''
labels: enhancement, needs triage
assignees: ''

---

### What would you like to be added


### Why this is needed
4 changes: 4 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
### Description
Please describe your pull request.

💔Thank you!
4 changes: 4 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
needs triage:
- '**' # index.php | src/main.php
- '.*' # .gitignore
- '.*/**' # .github/workflows/label.yml
47 changes: 0 additions & 47 deletions .github/workflows/go.yml

This file was deleted.

11 changes: 11 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Pull Request Labeler
on:
pull_request_target

jobs:
label:
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v3.0.2
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
60 changes: 60 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Create Release

on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

jobs:
test:
name: Lint, Test, Build
runs-on: ubuntu-20.04
strategy:
matrix:
go: [ '1.16', '1.17' ]
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Setup Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
-
name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: 'v1.44.0'
args: --timeout=30m
-
name: Test, Build
id: lintTestBuild
run: V=1 make

create_release:
name: Create Release
needs: test
runs-on: ubuntu-20.04
steps:
-
name: Is Pre-release
id: is_prerelease
run: |
set +e
echo ${{ github.ref }} | grep "\-rc.*"
OUT=$?
if [ $OUT -eq 0 ]; then IS_PRERELEASE=true; else IS_PRERELEASE=false; fi
echo "::set-output name=IS_PRERELEASE::${IS_PRERELEASE}"
-
name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: ${{ steps.is_prerelease.outputs.IS_PRERELEASE }}
45 changes: 45 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Test

on:
push:
tags-ignore:
- 'v*'
branches:
- "**"
pull_request:

jobs:
lintTestBuild:
name: Lint, Test, Build
runs-on: ubuntu-20.04
strategy:
matrix:
go: [ '1.16', '1.17' ]
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Setup Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
-
name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: 'v1.44.0'
args: --timeout=30m
-
name: Test, Build
id: lintTestBuild
run: V=1 make
-
name: Codecov
uses: codecov/codecov-action@v1.2.1
if: matrix.go == '1.17'
with:
file: ./coverage.out
name: codecov-umbrella
fail_ci_if_error: true

0 comments on commit 00b91e2

Please sign in to comment.