File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ permissions:
1010 actions : write
1111 contents : read
1212 id-token : write
13+ packages : write
1314
1415jobs :
1516 test :
7273 gem install bundler-audit
7374 bundle audit --update || true
7475 continue-on-error : true
76+
77+ publish :
78+ runs-on : ubuntu-latest
79+ needs : [test, security]
80+ if : github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop')
81+
82+ steps :
83+ - uses : actions/checkout@v4
84+
85+ - name : Set up Ruby
86+ uses : ruby/setup-ruby@v1
87+ with :
88+ ruby-version : " 3.3"
89+ bundler-cache : true
90+
91+ - name : Modify version for develop branch
92+ if : github.ref == 'refs/heads/develop'
93+ run : |
94+ sed -i "s/VERSION = '\([^']*\)'/VERSION = '\1.rc'/" lib/sudo/constants.rb
95+
96+ - name : Build gem
97+ run : gem build sudo.gemspec
98+
99+ - name : Publish to GitHub Packages
100+ run : |
101+ mkdir -p ~/.gem
102+ echo ":github: Bearer ${{ secrets.GITHUB_TOKEN }}" >> ~/.gem/credentials
103+ chmod 600 ~/.gem/credentials
104+ gem push *.gem --host https://rubygems.pkg.github.com/TwilightCoders
Original file line number Diff line number Diff line change 11require 'pathname'
22
33module Sudo
4- VERSION = '0.4.0-rc1 '
4+ VERSION = '0.4.0'
55
66 def self . root
77 @root ||= Pathname . new ( File . expand_path ( '../../' , __dir__ ) )
You can’t perform that action at this time.
0 commit comments