-
Notifications
You must be signed in to change notification settings - Fork 3
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 #95 from solarwinds/github-package-upload
GitHub package upload
- Loading branch information
Showing
4 changed files
with
78 additions
and
13 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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Copyright (c) 2023 SolarWinds, LLC. | ||
# All rights reserved. | ||
|
||
name: Ruby Gem to Github Package | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
name: Build + Publish to Github Package | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Ruby 3.1 and bundle | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 3.1 | ||
|
||
- name: Install gems | ||
run: | | ||
echo 'gem: --no-document' >> ~/.gemrc | ||
bundle install | ||
- name: Install swig 4.0.2 | ||
run: | | ||
apt udate && apt install -y --no-install-recommends bison | ||
curl -SL https://github.com/swig/swig/archive/refs/tags/v4.0.2.tar.gz | tar xzC /tmp | ||
cd /tmp/swig-4.0.2 | ||
./autogen.sh && ./configure && make && sudo make install | ||
cd - | ||
- name: Grab current version | ||
id: version | ||
run: | | ||
echo "gem_version=`ruby -e 'require "./lib/solarwinds_apm/version"; puts SolarWindsAPM::Version::STRING'`" >> $GITHUB_OUTPUT | ||
- name: Build gem and publish to github package | ||
id: gemstep | ||
run: | | ||
mkdir ~/.gem | ||
echo -e "---\n:github: Bearer $GITHUB_SECRET_TOKEN" >> ~/.gem/credentials | ||
chmod 0600 ~/.gem/credentials | ||
bundle exec rake build_gem_push_to_github_package[${{ steps.version.outputs.gem_version }}] | ||
env: | ||
GITHUB_SECRET_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
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