-
Notifications
You must be signed in to change notification settings - Fork 18
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 #24 from github/release-updates
Release Updates
- Loading branch information
Showing
58 changed files
with
179 additions
and
92 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 |
---|---|---|
|
@@ -17,7 +17,7 @@ jobs: | |
has_change: ${{ steps.diff.outputs.has_change}} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
|
||
- id: fetch-base | ||
if: github.event_name == 'pull_request' | ||
|
@@ -61,8 +61,9 @@ jobs: | |
contents: read | ||
|
||
steps: | ||
- uses: ruby/setup-ruby@v1 | ||
- uses: ruby/setup-ruby@250fcd6a742febb1123a77a841497ccaa8b9e939 # [email protected] | ||
with: | ||
bundler-cache: true | ||
ruby-version: ${{ matrix.ruby }} | ||
|
||
# If source files were not changed, we don't need the acceptance test suite | ||
|
@@ -71,9 +72,9 @@ jobs: | |
run: | | ||
echo "✅ Bypassing acceptance tests - they are not required for this change" | ||
- name: Check out code | ||
- name: checkout | ||
if: ${{ needs.changes.outputs.has_change == 'true' }} | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
|
||
# Use Docker layer caching for 'docker build' and 'docker-compose build' commands. | ||
# https://github.com/satackey/action-docker-layer-caching/releases/tag/v0.0.11 | ||
|
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,41 @@ | ||
name: build | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
workflow_call: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
name: build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
|
||
- uses: ruby/setup-ruby@250fcd6a742febb1123a77a841497ccaa8b9e939 # [email protected] | ||
with: | ||
bundler-cache: true | ||
|
||
- name: bootstrap | ||
run: script/bootstrap | ||
|
||
- name: build | ||
run: | | ||
GEM_NAME=$(ls | grep gemspec | cut -d. -f1) | ||
echo "Attempting to build gem $GEM_NAME..." | ||
gem build $GEM_NAME | ||
if [ $? -eq 0 ]; then | ||
echo "Gem built successfully!" | ||
else | ||
echo "Gem build failed!" | ||
exit 1 | ||
fi |
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
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 |
---|---|---|
|
@@ -17,11 +17,12 @@ jobs: | |
contents: read | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
|
||
- uses: ruby/setup-ruby@v1 | ||
- uses: ruby/setup-ruby@250fcd6a742febb1123a77a841497ccaa8b9e939 # [email protected] | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
bundler-cache: true | ||
|
||
- run: bundle exec rubocop -c .rubocop.yml lib/ spec/ |
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,61 @@ | ||
name: release | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- lib/version.rb | ||
|
||
permissions: | ||
contents: write | ||
packages: write | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
|
||
- uses: ruby/setup-ruby@250fcd6a742febb1123a77a841497ccaa8b9e939 # [email protected] | ||
with: | ||
bundler-cache: true | ||
|
||
- name: bootstrap | ||
run: script/bootstrap | ||
|
||
- name: lint | ||
run: bundle exec rubocop -c .rubocop.yml lib/ spec/ | ||
|
||
- name: test | ||
run: script/test | ||
|
||
- name: set GEM_NAME from gemspec | ||
run: echo "GEM_NAME=$(ls | grep gemspec | cut -d. -f1)" >> $GITHUB_ENV | ||
|
||
# builds the gem and saves the version to GITHUB_ENV | ||
- name: build | ||
run: echo "GEM_VERSION=$(gem build ${{ env.GEM_NAME }}.gemspec 2>&1 | grep Version | cut -d':' -f 2 | tr -d " \t\n\r")" >> $GITHUB_ENV | ||
|
||
- name: publish to GitHub packages | ||
run: | | ||
export OWNER=$( echo ${{ github.repository }} | cut -d "/" -f 1 ) | ||
GEM_HOST_API_KEY=${{ secrets.GITHUB_TOKEN }} gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} ${{ env.GEM_NAME }}-${{ env.GEM_VERSION }}.gem | ||
- name: release | ||
uses: ncipollo/release-action@a2e71bdd4e7dab70ca26a852f29600c98b33153e # [email protected] | ||
with: | ||
artifacts: "${{ env.GEM_NAME }}-${{ env.GEM_VERSION }}.gem" | ||
tag: "v${{ env.GEM_VERSION }}" | ||
generateReleaseNotes: true | ||
|
||
- name: Publish to RubyGems | ||
run: | | ||
mkdir -p ~/.gem | ||
echo -e "---\n:rubygems_api_key: ${{ secrets.RUBYGEMS_API_KEY }}" > ~/.gem/credentials | ||
chmod 0600 ~/.gem/credentials | ||
gem push ${{ env.GEM_NAME }}-${{ env.GEM_VERSION }}.gem | ||
rm ~/.gem/credentials |
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 |
---|---|---|
|
@@ -17,11 +17,12 @@ jobs: | |
contents: read | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
|
||
- uses: ruby/setup-ruby@v1 | ||
- uses: ruby/setup-ruby@250fcd6a742febb1123a77a841497ccaa8b9e939 # [email protected] | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
bundler-cache: true | ||
|
||
- run: script/test -d |
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
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
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
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 |
---|---|---|
@@ -1,14 +1,16 @@ | ||
# frozen_string_literal: true | ||
|
||
require_relative "lib/version" | ||
|
||
Gem::Specification.new do |s| | ||
s.name = ENV['GEM_NAME'] ? ENV['GEM_NAME'] : 'entitlements-app' | ||
s.version = File.read("VERSION").chomp | ||
s.name = ENV["GEM_NAME"] ? ENV["GEM_NAME"] : "entitlements-app" | ||
s.version = Entitlements::Version::VERSION | ||
s.summary = "git-managed LDAP group configurations" | ||
s.description = "The Ruby Gem that Powers Entitlements - GitHub's Identity and Access Management System" | ||
s.authors = ["GitHub, Inc. Security Ops"] | ||
s.email = "[email protected]" | ||
s.license = "MIT" | ||
s.files = Dir.glob("lib/**/*") + %w[bin/deploy-entitlements VERSION] | ||
s.files = Dir.glob("lib/**/*") + %w[bin/deploy-entitlements] | ||
s.homepage = "https://github.com/github/entitlements-app" | ||
s.executables = %w[deploy-entitlements] | ||
|
||
|
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,7 @@ | ||
# frozen_string_literal: true | ||
|
||
module Entitlements | ||
module Version | ||
VERSION = "0.3.0" | ||
end | ||
end |
Oops, something went wrong.