Skip to content

Commit

Permalink
fixup! Replace Travis CI with GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
lfdebrux committed Oct 21, 2021
1 parent 922744a commit 8d9447b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,21 @@ jobs:
with:
bundler-cache: true

- name: Check if new version to release
id: gem_version
run: |
gem_version=$(ruby -r rubygems -e "puts Gem::Specification::load('$(ls *.gemspec)').version")
echo "::set-output name=gem_version::$gem_version"
if git fetch origin "refs/tags/v$gem_version" >/dev/null 2>&1
then
echo "Tag 'v$gem_version' already exists"
echo "::set-output name=new_version::false"
else
echo "::set-output name=new_version::true"
- name: Publish
if: ${{ steps.gem_version.outputs.new_version }}
env:
RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
GEM: govuk_tech_docs
Expand Down

0 comments on commit 8d9447b

Please sign in to comment.