-
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.
* New test gem version 0.1.0 * update files * remove gitignore files * adding prerelease * sorry officer * changing to omniauth 1.0 * updated lock file
- Loading branch information
1 parent
cc4f3d5
commit e42093a
Showing
25 changed files
with
919 additions
and
95 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
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 @@ | ||
* @rewindio/integration-squad |
This file was deleted.
Oops, something went wrong.
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,9 @@ | ||
name: prerelease-gem | ||
|
||
on: | ||
issue_comment: | ||
types: [created] | ||
|
||
jobs: | ||
prerelease: | ||
uses: rewindio/github-action-common/.github/workflows/pre-release-gem.yml@v1 |
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,52 @@ | ||
name: Style Checks | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
changelog: | ||
name: changelog | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Get version | ||
id: get_version | ||
run: | | ||
version_file=$(find ./lib -name version.rb) | ||
version=$(grep VERSION $version_file |cut -f 2 -d= |tr -d \'|tr -d [:space:]) | ||
echo version=$version >> $GITHUB_OUTPUT | ||
echo version_tag=v$version >> $GITHUB_OUTPUT | ||
- name: validate changelog exists | ||
env: | ||
GEM_VERSION: ${{steps.get_version.outputs.version}} | ||
run: | | ||
error_code=0 | ||
grep "\[${GEM_VERSION}\]" CHANGELOG.md || error_code=$? | ||
if [ "${error_code}" -eq 1 ]; then | ||
echo "No changelog entry found for version ${GEM_VERSION}" | ||
exit 1 | ||
fi | ||
rubocop: | ||
name: runner / rubocop | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 3.2.2 | ||
|
||
- name: rubocop | ||
uses: reviewdog/action-rubocop@e70b014b8062c447d6b515ee0209f834ea93e696 #v2.5.0 | ||
with: | ||
rubocop_version: gemfile | ||
rubocop_extensions: rubocop-performance:gemfile rubocop-rspec:gemfile | ||
github_token: ${{ secrets.github_token }} | ||
filter_mode: file | ||
fail_on_error: true |
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,71 @@ | ||
name: tag-and-release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: 'lib/**/version.rb' | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@main | ||
|
||
- name: Set up Ruby 3.2.2 | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 3.2.2 | ||
|
||
- name: Get version | ||
id: get_version | ||
run: | | ||
version_file=$(find ./lib -name version.rb) | ||
version=$(grep VERSION $version_file |cut -f 2 -d= |tr -d \'|tr -d [:space:]) | ||
echo version=$version >> $GITHUB_OUTPUT | ||
echo version_tag=v$version >> $GITHUB_OUTPUT | ||
- name: Tag commit | ||
uses: tvdias/github-tagger@ed7350546e3e503b5e942dffd65bc8751a95e49d # v0.0.2 | ||
with: | ||
repo-token: "${{ secrets.GITHUB_TOKEN }}" | ||
tag: "${{steps.get_version.outputs.version_tag}}" | ||
|
||
- name: Upload to Rubygems | ||
env: | ||
RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }} | ||
run: | | ||
set +e | ||
mkdir -p ~/.gem | ||
touch ~/.gem/credentials | ||
chmod 600 ~/.gem/credentials | ||
echo ":rubygems_api_key: ${RUBYGEMS_API_KEY}" >> ~/.gem/credentials | ||
gemspec=$(ls *gemspec* | head -1) | ||
gem build $gemspec | ||
gem_name=$(ls -t *.gem | head -1) | ||
output=$(gem push *.gem) | ||
if [[ $output != *"Successfully"* ]]; then | ||
echo "Error uploading to Rubygems: $output" | ||
rm -f ~/.gem/credentials | ||
exit 1 | ||
else | ||
echo "Successfully uploaded to Rubygems: $output" | ||
rm -f ~/.gem/credentials | ||
fi | ||
- name: Extract from changelog | ||
id: extract_changes | ||
run: | | ||
# Must use a temporary file or it loses the formatting | ||
VERSION=${{steps.get_version.outputs.version}}; awk "/## \[$VERSION\]/{flag=1;next}/## \[/{flag=0}flag" CHANGELOG.md > REL-BODY.md | ||
- name: Create Release | ||
uses: ncipollo/release-action@6c75be85e571768fa31b40abf38de58ba0397db5 # v1.13.0 | ||
with: | ||
tag: ${{steps.get_version.outputs.version_tag}} | ||
artifacts: "*.gem, CHANGELOG.md" | ||
bodyFile: "REL-BODY.md" | ||
token: ${{ secrets.GITHUB_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,46 @@ | ||
name: Tests | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
rspec: | ||
name: rspec tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 3.2.2 | ||
bundler-cache: true | ||
|
||
- name: Run rspec tests | ||
run: | | ||
bundle exec rspec | ||
- name: Upload coverage results | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: coverage-results | ||
path: coverage | ||
retention-days: 5 | ||
|
||
coverage: | ||
needs: rspec | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download coverage results | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: coverage-results | ||
path: coverage | ||
|
||
- name: Simplecov Report | ||
uses: aki77/simplecov-report-action@7fd5fa551dd583dd437a11c640b2a1cf23d6cdaa # v1.5.2 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
failedThreshold: 100 | ||
resultPath: coverage/.last_run.json |
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,20 @@ | ||
*.gem | ||
*.rbc | ||
.bundle | ||
.config | ||
.yardoc | ||
.DS_Store | ||
**/.DS_Store | ||
InstalledFiles | ||
_yardoc | ||
coverage/ | ||
doc/ | ||
lib/bundler/man | ||
pkg | ||
vendor/ | ||
rdoc | ||
spec/reports | ||
test/tmp | ||
test/version_tmp | ||
tmp | ||
.idea/ |
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 @@ | ||
--require spec_helper |
Oops, something went wrong.