Skip to content

Commit

Permalink
adds publish step and run build command
Browse files Browse the repository at this point in the history
  • Loading branch information
Vignesh Kennadi committed Sep 27, 2024
1 parent 30257b1 commit 2171411
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
37 changes: 37 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Publish
on:
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout xero-ruby repo
uses: actions/checkout@v4
with:
repository: XeroAPI/xero-ruby
path: xero-ruby

- name: Set up Ruby environment
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2.0'
bundler-cache: true

- name: Install dependencies
run: bundle install
working-directory: xero-ruby

- name: Run Build
run: gem build
working-directory: xero-ruby

- name: Publish to Ruby
env:
RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
run: |
gemspec_file=$(ls *.gemspec)
gem_file=$(gem build "$gemspec_file" | grep -o '[^ ]*\.gem')
echo "$gem_file"
working-directory: xero-ruby
2 changes: 1 addition & 1 deletion lib/xero-ruby/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
=end

module XeroRuby
VERSION = '9.3.0'
VERSION = '9.3.0-alpha'
end

0 comments on commit 2171411

Please sign in to comment.