Skip to content

Commit fe05315

Browse files
committed
testing tag creation/push
1 parent 88499a3 commit fe05315

File tree

2 files changed

+24
-11
lines changed

2 files changed

+24
-11
lines changed

.github/workflows/release.yml

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ name: Harmoniser Release
22

33
on:
44
push:
5-
branches: [ "master" ]
5+
branches: [ "wadus" ]
66

77
jobs:
88
publish:
99
name: Publish
1010
runs-on: ubuntu-latest
1111
permissions:
12-
contents: read
12+
contents: write
1313
packages: write
1414

1515
steps:
@@ -19,13 +19,26 @@ jobs:
1919
with:
2020
ruby-version: 3.2.2
2121

22-
- name: Publish to RubyGems
22+
# - name: Publish to RubyGems
23+
# run: |
24+
# mkdir -p $HOME/.gem
25+
# touch $HOME/.gem/credentials
26+
# chmod 0600 $HOME/.gem/credentials
27+
# printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
28+
# gem build *.gemspec
29+
# gem push *.gem
30+
# env:
31+
# GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
32+
33+
- name: Get version from gemspec
34+
id: get_version
35+
run: echo "{VERSION}={$(ruby -e 'puts Gem::Specification::load(\"harmoniser.gemspec\").version')}" >> $GITHUB_OUTPUT
36+
37+
- name: Create and Push Git Tag
2338
run: |
24-
mkdir -p $HOME/.gem
25-
touch $HOME/.gem/credentials
26-
chmod 0600 $HOME/.gem/credentials
27-
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
28-
gem build *.gemspec
29-
gem push *.gem
39+
git config --global user.name "github-actions"
40+
git config --global user.email "[email protected]"
41+
git tag v${{ steps.get_version.outputs.VERSION }}
42+
git push origin v${{ steps.get_version.outputs.VERSION }}
3043
env:
31-
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
44+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

lib/harmoniser/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module Harmoniser
2-
VERSION = "0.9.0"
2+
VERSION = "0.0.0"
33
end

0 commit comments

Comments
 (0)