-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Forgot to re-add the files that were renamed.
- Loading branch information
Richard Liang
committed
Nov 21, 2024
1 parent
0b5767b
commit b2ada0f
Showing
2 changed files
with
76 additions
and
0 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,39 @@ | ||
name: Build and publish the Ruby package | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build_gem: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code from repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Log into GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build devcontainer and build the package | ||
uses: devcontainers/[email protected] | ||
with: | ||
imageName: ghcr.io/cfe-lab/gotoh_devcontainer | ||
cacheFrom: ghcr.io/cfe-lab/gotoh_devcontainer | ||
runCmd: cd /workspaces/gotoh/ruby && bash build_gem.bash | ||
env: | | ||
CFE_GOTOH_VERSION=${{ github.ref_name }} | ||
- name: Publish gem to Github Packages | ||
run: | | ||
mkdir -p $HOME/.gem | ||
touch $HOME/.gem/credentials | ||
chmod 0600 $HOME/.gem/credentials | ||
printf -- "---\n:github: Bearer ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials | ||
gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem | ||
env: | ||
GEM_HOST_API_KEY: ${{ secrets.GITHUB_TOKEN }} | ||
OWNER: ${{ github.repository_owner }} |
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,37 @@ | ||
name: Automated Tests | ||
|
||
on: ["push"] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code from repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Log into GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build devcontainer and run tests | ||
uses: devcontainers/[email protected] | ||
with: | ||
imageName: ghcr.io/cfe-lab/gotoh_devcontainer | ||
cacheFrom: ghcr.io/cfe-lab/gotoh_devcontainer | ||
runCmd: cd /workspaces/gotoh/ruby && rake test | ||
env: | | ||
CI_COMMIT_REF=${{ github.ref_name }} | ||
CI_COMMIT_SHA=${{ github.sha }} | ||
CI_PIPELINE_ID=${{ github.run_id }} | ||
CI_COMMIT_BRANCH=${{ github.ref_name }} | ||
CI_PROJECT=${{ github.repository }} | ||
- name: Upload coverage reports to Codecov with GitHub Action | ||
uses: codecov/codecov-action@v5 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
root_dir: ${{ github.workspace }} | ||
files: ${{ github.workspace }}/ruby/coverage/coverage.xml |