Skip to content

Commit

Permalink
testing tag creation/push
Browse files Browse the repository at this point in the history
  • Loading branch information
jollopre committed Aug 22, 2024
1 parent 88499a3 commit c602522
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 11 deletions.
33 changes: 23 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ name: Harmoniser Release

on:
push:
branches: [ "master" ]
branches: [ "wadus" ]

jobs:
publish:
name: Publish
runs-on: ubuntu-latest
permissions:
contents: read
contents: write
packages: write

steps:
Expand All @@ -19,13 +19,26 @@ jobs:
with:
ruby-version: 3.2.2

- name: Publish to RubyGems
# - name: Publish to RubyGems
# run: |
# mkdir -p $HOME/.gem
# touch $HOME/.gem/credentials
# chmod 0600 $HOME/.gem/credentials
# printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
# gem build *.gemspec
# gem push *.gem
# env:
# GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"

- name: Get version from gemspec
id: get_version
run: echo "{VERSION}={$(ruby -e 'puts \"wadus\"')}" >> $GITHUB_OUTPUT

- name: Create and Push Git Tag
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
gem build *.gemspec
gem push *.gem
git config --global user.name "github-actions"
git config --global user.email "[email protected]"
git tag v${{ steps.get_version.outputs.VERSION }}
git push origin v${{ steps.get_version.outputs.VERSION }}
env:
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
2 changes: 1 addition & 1 deletion lib/harmoniser/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Harmoniser
VERSION = "0.9.0"
VERSION = "0.0.0"
end

0 comments on commit c602522

Please sign in to comment.