forked from near-rails-guide/borsh-rb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
132 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,40 @@ | ||
{ | ||
"extends": [ | ||
"config:base" | ||
], | ||
"prConcurrentLimit": 5, | ||
"baseBranches": ["master"], | ||
"assignees": ["@strnadj"], | ||
"schedule": [ | ||
"before 6am on the first week of the month" | ||
], | ||
"docker": { | ||
"enabled": false | ||
}, | ||
"docker-compose": { | ||
"enabled": false | ||
}, | ||
"circleci": { | ||
"enabled": false | ||
}, | ||
"vulnerabilityAlerts": { | ||
"labels": ["dependencies", "security"], | ||
"assignees": ["@strnadj", "@juliosantos", "@tiagofragoso"], | ||
"schedule": "at any time" | ||
}, | ||
"packageRules": [ | ||
{ | ||
"matchPackagePatterns": [ | ||
"*" | ||
], | ||
"matchUpdateTypes": [ | ||
"major", | ||
"minor", | ||
"patch" | ||
], | ||
"groupName": "all dependencies", | ||
"groupSlug": "all-dependencies", | ||
"labels": ["dependencies"] | ||
} | ||
] | ||
} |
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,25 @@ | ||
name: Create release | ||
|
||
# When a tag is pushed, create a release | ||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
jobs: | ||
build: | ||
name: Create Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@master | ||
with: | ||
fetch-depth: 0 # Fetch all tags | ||
|
||
- name: Create Release for Tag | ||
id: release_tag | ||
uses: Akryum/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} |
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,67 @@ | ||
name: Review and deploy | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
target_name: | ||
runs-on: ubuntu-latest | ||
|
||
outputs: | ||
name: ${{steps.branch_name.outputs.current_branch}} | ||
cache_key: ${{steps.cache_key.outputs.key}} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Get branch name | ||
id: branch_name | ||
uses: tj-actions/[email protected] | ||
|
||
tests: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
bundler-cache: true | ||
- name: Run test | ||
run: | | ||
bundle exec rspec | ||
build: | ||
needs: | ||
- tests | ||
- target_name | ||
|
||
runs-on: ubuntu-latest | ||
|
||
if: ${{needs.target_name.outputs.name == 'master'}} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
bundler-cache: true | ||
|
||
- name: Set up authorization | ||
run: | | ||
mkdir -p ~/.gem | ||
touch ~/.gem/credentials | ||
chmod 600 ~/.gem/credentials | ||
echo ":github: Bearer ${{ secrets.GITHUB_TOKEN }}" >> ~/.gem/credentials | ||
- name: Build | ||
run: | | ||
find . -name '*.gemspec' -maxdepth 1 -exec gem build {} \; | ||
- name: Deploy | ||
run: | | ||
find . -name '*.gem' -maxdepth 1 -exec gem push --key github --host "https://rubygems.pkg.github.com/trustfractal" {} \; |