unitsml 0.2.2 → 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: ddeea3bb17c86ba25f7372ada8f793263409001041c7b9b2599bce78fa93c5b2
4
- data.tar.gz: cc52c354309aebb6f3d954fe8660103631447e5d3a46e8c64d66a0d39f26f09f
3
+ metadata.gz: 23178be1c7f1180dd62237f883ace85d945b12c5e9d8995d61d5c37458e40ff4
4
+ data.tar.gz: d9c9dd7b64cba5f451f5e3c35996348566442002ce11023cc83b5b8d25e45c5f
5
5
  SHA512:
6
- metadata.gz: e62bbe2aada03fc0563c878abc73991332407f12d506c04b31d3c386cded8cb431e202f654612487606b4b57121eb46686cb46a85e7ea299f7ad0654d720d875
7
- data.tar.gz: fab6eb7ea16bba3ee8d4d0bc707ae417fd24be1bdd98ac9003207d4edcf37b9dd1eeeb122e231cc576effab1d7285f93c8b8a1ff60b281438a22aef569e43c56
6
+ metadata.gz: 877e2033da979d98cf66e18b1bef5694552ee97ebaab6727c2269dfe103f944d0b79f7fe4e9d96fed3ad46a7f4a7de9e06d67eb94a6f2fcea2193ffac09edd00
7
+ data.tar.gz: 4997aac85d434ec7411598807534b78041ba2f7a0671ac125937c05d81070254f9cd621b76425e3fe1ae99aa800b0ce1dffc8e3d374153bdb9e23cf91dc8c47d
@@ -5,16 +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
- secrets:
20
- 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.2"
2
+ VERSION = "0.2.4"
3
3
  end