unitsml 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4e428b325cfc9049247c4c1594b7f0b6a9a1a69887bda09f29ee572807dbc8be
4
- data.tar.gz: a6767a8951c7e483e5693ac11874bff5fe3a9a4d3ad828bca543f09f5dba3982
3
+ metadata.gz: 23178be1c7f1180dd62237f883ace85d945b12c5e9d8995d61d5c37458e40ff4
4
+ data.tar.gz: d9c9dd7b64cba5f451f5e3c35996348566442002ce11023cc83b5b8d25e45c5f
5
5
  SHA512:
6
- metadata.gz: 800af6da5a084564685118683cd7b7a3e997f0c56e9e11cf5ac232aa4b1cab138634bc7c1d608a527a49a91bfbc018dec00c881d81d29f58c36455025d25e0e3
7
- data.tar.gz: 3c8b0c7134447857ba6a8a7a45fbbec5b0bf4e62077ee0e49a5cb3b28ff40dbf04ac32fc82fc680f28634aba4659791d52e329d830dfcb062b5b8023bcc20771
6
+ metadata.gz: 877e2033da979d98cf66e18b1bef5694552ee97ebaab6727c2269dfe103f944d0b79f7fe4e9d96fed3ad46a7f4a7de9e06d67eb94a6f2fcea2193ffac09edd00
7
+ data.tar.gz: 4997aac85d434ec7411598807534b78041ba2f7a0671ac125937c05d81070254f9cd621b76425e3fe1ae99aa800b0ce1dffc8e3d374153bdb9e23cf91dc8c47d
@@ -5,17 +5,72 @@ on:
5
5
  inputs:
6
6
  next_version:
7
7
  description: |
8
- Next release version. Possible values: x.y.z, major, minor, patch or pre|rc|etc
8
+ Next release version. Possible values: x.y.z, major, minor, patch (or pre|rc|etc).
9
+ Also, you can pass 'skip' to skip 'git tag' and do 'gem push' for the current version
9
10
  required: true
10
- default: 'skip'
11
- repository_dispatch:
12
- types: [ do-release ]
13
-
11
+ type: string
12
+ secrets:
13
+ pat_token:
14
+ required: false
14
15
  jobs:
15
16
  release:
16
- uses: metanorma/ci/.github/workflows/rubygems-release.yml@main
17
- with:
18
- next_version: ${{ github.event.inputs.next_version }}
19
- post_install: 'git submodule update --remote --recursive'
20
- secrets:
21
- rubygems-api-key: ${{ secrets.UNITSML_CI_RUBYGEMS_API_KEY }}
17
+ runs-on: ubuntu-latest
18
+ env:
19
+ HAVE_PAT_TOKEN: ${{ secrets.pat_token != '' }}
20
+ steps:
21
+ - uses: actions/checkout@v3
22
+ with:
23
+ submodules: true
24
+
25
+ - run: git fetch --tags origin
26
+
27
+ - if: ${{ env.HAVE_PAT_TOKEN == 'true' }}
28
+ uses: metanorma/ci/gh-rubygems-setup-action@main
29
+ with:
30
+ token: ${{ secrets.pat_token }}
31
+
32
+ # workaround for https://github.com/actions/runner-images/issues/37
33
+ - if: matrix.os == 'ubuntu-latest'
34
+ run: |
35
+ sudo apt-get update
36
+ sudo apt-get install libcurl4-openssl-dev
37
+
38
+ - uses: ruby/setup-ruby@v1
39
+ with:
40
+ ruby-version: '3.1'
41
+ bundler-cache: true
42
+
43
+ - run: |
44
+ git config user.name github-actions
45
+ git config user.email github-actions@github.com
46
+
47
+ - run: gem install gem-release
48
+
49
+ - run: gem bump --version ${{ inputs.next_version }} --tag --push
50
+
51
+ - name: publish to rubygems.org
52
+ env:
53
+ RUBYGEMS_API_KEY: ${{ secrets.UNITSML_CI_RUBYGEMS_API_KEY }}
54
+ run: |
55
+ mkdir -p ~/.gem
56
+ envsubst << 'EOF' > ~/.gem/credentials
57
+ ---
58
+ :rubygems_api_key: ${RUBYGEMS_API_KEY}
59
+ EOF
60
+ chmod 0600 ~/.gem/credentials
61
+ bundle exec rake release
62
+
63
+ # This workflow usually called via repository_dispatch or direct workflow_dispatch
64
+ # in both cases `github.ref` doesn't reflect real version so we calculate it from gemspecfile
65
+ - name: get current gem ref
66
+ id: gem-tag-ref
67
+ run: |
68
+ GEM_VERSION=$(ruby -e "puts Gem::Specification.load(Dir.glob('*.gemspec').first).version.to_s")
69
+ echo "value=refs/tags/v${GEM_VERSION}" >> $GITHUB_OUTPUT
70
+
71
+ - uses: peter-evans/repository-dispatch@v2
72
+ with:
73
+ token: ${{ secrets.pat_token || github.token }}
74
+ repository: ${{ github.repository }}
75
+ event-type: release-passed
76
+ client-payload: '{"ref": "${{ steps.gem-tag-ref.outputs.value }}", "sha": "${{ github.sha }}", "type": "release-passed"}'
@@ -1,3 +1,3 @@
1
1
  module Unitsml
2
- VERSION = "0.2.3"
2
+ VERSION = "0.2.4"
3
3
  end