mn2pdf 2.80 → 2.81

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 93795d698f2cf69e62dd97e8fc6c3a3bd7b1532931e731c5687eca3361c5644d
4
- data.tar.gz: 11be1c7e2d0ec40fb9fd1f7307025562de6df634eb687694314bc925799b90d8
3
+ metadata.gz: e4f013436752c33ce2567254fcb80a89c8d82a5b06ad888e9a736af82ce88157
4
+ data.tar.gz: 8be509c7ec8700cec8744e86050b0b73a4521830a80ab98eb8f47feb7f70906a
5
5
  SHA512:
6
- metadata.gz: 0f38dfb5a450eaf09d8c229cc298cfc6142f681ef68d01968dfb6fdd35a3cf8b6af9e0090a787d49a362ac6ef3240fb0eca9cd39ab51c7a6920b12a9c3363bef
7
- data.tar.gz: 2488159035bc702a5d9d071153be567f8f6e0fe67b6f78c3caaae94ef01a6bf9ba5eae6e599492d59c5772d76e7ad1b3e30fc26048b06cee9395b708156f56dc
6
+ metadata.gz: b1915fdcd92f4e7cba1d5fdd51bc3c6f501683b1d6c72a253ea52ed5b088b776754e36730c584ee842f8c57897c0595787d2e325cfe35a0f37ff9e560226081b
7
+ data.tar.gz: fc64740bbdf683424d5dd59075d2503d76deba5c555ddd27a4764b53923ea10d0103d076e5ded5fabb2317b34575c3a26b3b839d659f60d34e044c5405227e0e
@@ -4,6 +4,10 @@ on:
4
4
  repository_dispatch:
5
5
  types: [ metanorma/mn2pdf ]
6
6
 
7
+ permissions:
8
+ contents: write
9
+ pull-requests: write
10
+
7
11
  jobs:
8
12
  prepare:
9
13
  uses: metanorma/ci/.github/workflows/prepare-rake.yml@main
@@ -12,14 +16,16 @@ jobs:
12
16
  runs-on: ubuntu-latest
13
17
  needs: prepare
14
18
  if: startsWith(github.event.client_payload.ref, 'refs/tags/v')
19
+ outputs:
20
+ pr-number: ${{ steps.bump.outputs.pr-number }}
15
21
  steps:
16
22
  - uses: actions/checkout@v3
17
23
  with:
18
24
  token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
19
25
 
20
26
  - run: |
21
- git config --global user.name "metanorma-ci"
22
- git config --global user.email "metanorma-ci@users.noreply.github.com"
27
+ git config --global user.name "github-actions[bot]"
28
+ git config --global user.email "github-actions[bot]@users.noreply.github.com"
23
29
 
24
30
  - name: Parse mn2pdf version
25
31
  env:
@@ -45,23 +51,30 @@ jobs:
45
51
  MN2PDF_VERSION: ${{ env.MN2PDF_VERSION }}
46
52
  run: bundle exec rake release:bump[${MN2PDF_VERSION}]
47
53
 
48
- # main is protected (a direct push is rejected for want of the CLA
49
- # check), so the bump lands through a pull request with auto-merge;
50
- # the tag is pushed either way and the gem publishes from it.
54
+ # main is protected, so the bump lands through a pull request that the
55
+ # merge job below sees through; the tag is pushed first and the gem
56
+ # publishes from it. A repeat dispatch reuses the open pull request.
51
57
  - name: Push branch and tag, open the bump pull request
58
+ id: bump
52
59
  env:
53
60
  MN2PDF_VERSION: ${{ env.MN2PDF_VERSION }}
54
61
  GH_TOKEN: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
55
62
  run: |
56
- git add -u lib/mn2pdf/version.rb
57
- git commit -m "Bump version to ${MN2PDF_VERSION}"
58
- git tag v${MN2PDF_VERSION}
59
- git push origin "HEAD:refs/heads/release/v${MN2PDF_VERSION}"
60
- git push origin "v${MN2PDF_VERSION}"
61
- gh pr create --base main --head "release/v${MN2PDF_VERSION}" \
62
- --title "Bump version to ${MN2PDF_VERSION}" \
63
- --body "Version bump for the released jar v${MN2PDF_VERSION}."
64
- gh pr merge --rebase --auto --head "release/v${MN2PDF_VERSION}"
63
+ BRANCH="release/v${MN2PDF_VERSION}"
64
+ pr="$(gh pr list --head "$BRANCH" --state open --json number --jq '.[0].number // ""')"
65
+ if [ -z "$pr" ]; then
66
+ git add -u lib/mn2pdf/version.rb
67
+ git commit -m "Bump version to ${MN2PDF_VERSION}"
68
+ git tag "v${MN2PDF_VERSION}"
69
+ git push origin "HEAD:refs/heads/$BRANCH"
70
+ git ls-remote --exit-code --tags origin "refs/tags/v${MN2PDF_VERSION}" > /dev/null ||
71
+ git push origin "v${MN2PDF_VERSION}"
72
+ url="$(gh pr create --base main --head "$BRANCH" \
73
+ --title "Bump version to ${MN2PDF_VERSION}" \
74
+ --body "Version bump for the released jar v${MN2PDF_VERSION}.")"
75
+ pr="${url##*/}"
76
+ fi
77
+ echo "pr-number=$pr" >> "$GITHUB_OUTPUT"
65
78
 
66
79
  - if: failure()
67
80
  uses: JasonEtco/create-an-issue@v2
@@ -72,3 +85,11 @@ jobs:
72
85
  update_existing: true
73
86
  search_existing: all
74
87
  filename: .github/RELEASE_ISSUE_TEMPLATE.md
88
+
89
+ merge:
90
+ needs: tag-repo
91
+ if: needs.tag-repo.outputs.pr-number != ''
92
+ uses: metanorma/ci/.github/workflows/generic-bot-pr-merge.yml@main
93
+ with:
94
+ pr-number: ${{ needs.tag-repo.outputs.pr-number }}
95
+ merge-method: rebase
data/bin/mn2pdf.jar CHANGED
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: data/bin/mn2pdf.jar
3
- size: 46156382 bytes
4
- sha256: 7a49bd4e170a729a5b31f6ff2d9fb2c66107fceb2707899ba1ed904828b7edbc
3
+ size: 46156695 bytes
4
+ sha256: d30d8bf8ff7e7490da1181dc4686668d8c91eaa4f979756ec00bab5fbff89406
@@ -1,4 +1,4 @@
1
1
  module Mn2pdf
2
- VERSION = "2.80".freeze
3
- MN2PDF_JAR_VERSION = "2.80"
2
+ VERSION = "2.81".freeze
3
+ MN2PDF_JAR_VERSION = "2.81"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mn2pdf
3
3
  version: !ruby/object:Gem::Version
4
- version: '2.80'
4
+ version: '2.81'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.