-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from grumbach/ci
ci: add .github from another repo
- Loading branch information
Showing
10 changed files
with
517 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: bug | ||
assignees: '' | ||
|
||
--- | ||
|
||
Thank you for contributing to the project! | ||
We recommend you check out our ["Contributing to the SAFE Network"](https://github.com/maidsafe/QA/blob/master/CONTRIBUTING.md) guide if you haven't already. | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior, e.g.: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Desktop (please complete the following information where applicable):** | ||
- OS: [e.g. Ubuntu 18.04] | ||
- Shell: [e.g. Zsh] | ||
- Rust: [e.g. 1.42.0 stable] | ||
- Browser [e.g. chrome, safari] | ||
- Version [e.g. 22] | ||
- etc | ||
|
||
**Smartphone (please complete the following information where applicable):** | ||
- Device: [e.g. iPhone6] | ||
- OS: [e.g. iOS8.1] | ||
- Browser [e.g. stock browser, safari] | ||
- Version [e.g. 22] | ||
- etc | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: enhancement | ||
assignees: '' | ||
|
||
--- | ||
|
||
Thank you for contributing to the project! | ||
We recommend you check out our ["Contributing to the SAFE Network"](https://github.com/maidsafe/QA/blob/master/CONTRIBUTING.md) guide if you haven't already. | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# auto merge workflow. | ||
# | ||
# Auto merge PR if commit msg begins with `chore(release):`, | ||
# or if it has been raised by Dependabot. | ||
# Uses https://github.com/ridedott/merge-me-action. | ||
|
||
name: Merge Version Change and Dependabot PRs automatically | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
merge: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: '0' | ||
|
||
- name: get commit message | ||
run: | | ||
commitmsg=$(git log --format=%s -n 1 ${{ github.event.pull_request.head.sha }}) | ||
echo "commitmsg=${commitmsg}" >> $GITHUB_ENV | ||
- name: show commit message | ||
run : echo $commitmsg | ||
|
||
- name: Merge Version change PR | ||
if: startsWith( env.commitmsg, 'chore(release):') | ||
uses: ridedott/merge-me-action@81667e6ae186ddbe6d3c3186d27d91afa7475e2c | ||
with: | ||
GITHUB_LOGIN: dirvine | ||
GITHUB_TOKEN: ${{ secrets.MERGE_BUMP_BRANCH_TOKEN }} | ||
MERGE_METHOD: REBASE | ||
|
||
- name: Dependabot Merge | ||
uses: ridedott/merge-me-action@master | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
MERGE_METHOD: REBASE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Version bump and create PR for changes | ||
|
||
on: | ||
# Trigger the workflow on push only for the master branch | ||
push: | ||
branches: | ||
- master | ||
|
||
env: | ||
NODE_ENV: 'development' | ||
|
||
jobs: | ||
update_changelog: | ||
runs-on: ubuntu-20.04 | ||
# Dont run if we're on a release commit | ||
if: "!startsWith(github.event.head_commit.message, 'chore(release):')" | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: '0' | ||
- name: Bump Version | ||
uses: maidsafe/rust-version-bump-branch-creator@v2 | ||
with: | ||
token: ${{ secrets.BRANCH_CREATOR_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: Commitlint | ||
on: [pull_request] | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- uses: wagoid/commitlint-github-action@f114310111fdbd07e99f47f9ca13d62b3ec98372 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Create GitHub Release | ||
|
||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
release: | ||
# only if we have a tag | ||
name: Release | ||
runs-on: ubuntu-20.04 | ||
if: "startsWith(github.event.head_commit.message, 'chore(release):')" | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: '0' | ||
|
||
- name: Set tag as env | ||
shell: bash | ||
run: echo "RELEASE_VERSION=$(echo ${GITHUB_REF:10})" >> $GITHUB_ENV | ||
|
||
- name: lets check tag | ||
shell: bash | ||
run: echo ${{ env.RELEASE_VERSION }} | ||
|
||
- name: Generate Changelog | ||
shell: bash | ||
run: awk '/# \[/{c++;p=1}{if(c==2){exit}}p;' CHANGELOG.md > RELEASE-CHANGELOG.txt | ||
- run: cat RELEASE-CHANGELOG.txt | ||
- name: Release generation | ||
uses: softprops/action-gh-release@91409e712cf565ce9eff10c87a8d1b11b81757ae | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.MERGE_BUMP_BRANCH_TOKEN }} | ||
with: | ||
body_path: RELEASE-CHANGELOG.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# Push to master workflow. | ||
# | ||
# Runs when a PR has been merged to the master branch. | ||
# | ||
# 1. Generates a release build. | ||
# 2. If the last commit is a version change, publish. | ||
|
||
name: Master | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
env: | ||
# Run all cargo commands with --verbose. | ||
CARGO_TERM_VERBOSE: true | ||
RUST_BACKTRACE: 1 | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macOS-latest] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
|
||
# Cache. | ||
- name: Cargo cache registry, index and build | ||
uses: actions/cache@v2.1.4 | ||
with: | ||
path: | | ||
~/.cargo/registry | ||
~/.cargo/git | ||
target | ||
key: ${{ runner.os }}-cargo-cache-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
# Make sure the code builds. | ||
- name: Run cargo build | ||
run: cargo build --release --workspace | ||
|
||
# Publish if we're on a release commit | ||
publish: | ||
name: Publish | ||
runs-on: ubuntu-latest | ||
needs: build | ||
if: "startsWith(github.event.head_commit.message, 'chore(release):')" | ||
steps: | ||
- uses: actions/checkout@v2 | ||
# checkout with fetch-depth: '0' to be sure to retrieve all commits to look for the semver commit message | ||
with: | ||
fetch-depth: '0' | ||
|
||
# Install Rust | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
|
||
# Publish to crates.io. | ||
- name: Cargo Login | ||
run: cargo login ${{ secrets.CRATES_IO_TOKEN }} | ||
|
||
- name: Cargo Publish | ||
run: cargo publish --allow-dirty |
Oops, something went wrong.