Skip to content

Commit

Permalink
feat: automatize the project deployment proccess
Browse files Browse the repository at this point in the history
  • Loading branch information
danilogco committed May 6, 2022
1 parent d860f86 commit b6b51d2
Show file tree
Hide file tree
Showing 11 changed files with 110 additions and 155 deletions.
40 changes: 0 additions & 40 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

23 changes: 0 additions & 23 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

41 changes: 41 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Build

on:
workflow_dispatch:
push:
branches:
- dev
pull_request:
branches:
- '*'
paths-ignore:
- '**.md'

jobs:
Testing:
if: ${{ github.actor != 'dependabot[bot]' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1.2'

- name: Run Install
run: |
sudo apt-get -yqq install libpq-dev
gem update --system
gem install rake
gem install bundler
bundle install
- name: Run Linter (rubocop)
run: |
bundle exec rubocop --format json -o report.json
- name: Run Tests (rspec)
run: |
bundle exec rspec
60 changes: 60 additions & 0 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Deployment

on:
workflow_dispatch:
push:
branches:
- master

jobs:
Testing:
name: Testing
if: ${{ github.actor != 'dependabot[bot]' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1.2'
- name: Run Install
run: |
sudo apt-get -yqq install libpq-dev
gem update --system
gem install rake
gem install bundler
bundle install
- name: Run Linter (rubocop)
run: |
bundle exec rubocop --format json -o report.json
- name: Run Tests (rspec)
run: |
bundle exec rspec
Publishing:
needs: Testing
runs-on: ubuntu-latest
environment:
name: Production
url: https://rubygems.org/gems/bigid_bgcheck
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set environment variables
id: vars
run: |
echo ::set-output name=project_version::$(ruby bin/version.rb)
- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.vars.outputs.project_version }}
name: ${{ steps.vars.outputs.project_version }}
bodyFile: "docs/CHANGELOG.md"
- name: Publish gem
uses: dawidd6/action-publish-gem@v1
with:
# Optional, will publish to RubyGems if specified
api_key: ${{secrets.RUBYGEMS_API_KEY}}
# Optional, will publish to GitHub Packages if specified
github_token: ${{secrets.GITHUB_TOKEN}}
53 changes: 0 additions & 53 deletions .github/workflows/ruby.yml

This file was deleted.

38 changes: 0 additions & 38 deletions CHANGELOG.md

This file was deleted.

10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,15 @@ Installation for Rails
```ruby
# Add to the Gemfile
gem "bigid_bgcheck", "~> 0.3"
gem "bigid_bgcheck", github: "Quasar-Flash/bigid_bgcheck"
```

Installation using the Github Gem repo
-----------------

```ruby
source "https://rubygems.pkg.github.com/quasar-flash" do
gem "bigid_bgcheck", "0.3.1"
end
```

Setting the BigID credentials
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit b6b51d2

Please sign in to comment.