Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create publish-gem.yml #50

Merged
merged 6 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
ruby-version: 3.2
bundler-cache: true
- name: build
run: script/bootstrap
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/publish-gem.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Publish Gem

on:
release:
types: [released]

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
- name: Build gem
run: |
gem build github-pages.gemspec
- name: Publish
run: |
gem push github-pages.gem --key ${{ secrets.PAGES_GEM_PUBLISH }}
3 changes: 3 additions & 0 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ At a high level, [the process for proposing changes](https://guides.github.com/i

`script/cibuild`

## Publishing Gem
In order to publish the Gem bump the version in *this file*, commit, create a tag with the new version number, and finally push the commit and tag to the repo.

## Code of conduct

This project is governed by [the Contributor Covenant Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code.
Expand Down
2 changes: 1 addition & 1 deletion script/cibuild
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -e

bundle exec jekyll build
bundle exec htmlproofer ./_site --check-html --check-sri
bundle exec htmlproofer ./_site --check-html --check-sri --typhoeus-config='{"headers":{"User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0"}}'
bundle exec rubocop -D --config .rubocop.yml
bundle exec script/validate-html
gem build jekyll-theme-midnight.gemspec
2 changes: 1 addition & 1 deletion script/validate-html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def validate(file)

return puts "Valid!" if results.errors.empty?

results.errors.each { |err| puts err.to_s }
results.errors.each { |err| puts err }
exit 1
end

Expand Down
Loading