Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#285: Atum Release 0.3.0 #288

Merged
merged 3 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/jacoco_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ on:
env:
scalaLong: 2.13.11
scalaShort: "2.13"
coverage-overall: 60.0
coverage-overall: 58.0
coverage-changed-files: 80.0
check-overall-coverages: true

Expand Down
79 changes: 44 additions & 35 deletions .github/workflows/release_draft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,39 +29,40 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Validate format of received tag
uses: actions/github-script@v7
with:
script: |
const newTag = core.getInput('tag-name');
const regex = /^v[0-9]+\.[0-9]+\.[0-9]+$/;

if (!regex.test(newTag)) {
core.setFailed('Tag does not match the required format "v[0-9]+.[0-9]+.[0-9]+"');
return;
}

// get all tags
const { data: refs } = await github.rest.git.listMatchingRefs({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'tags/'
});

const latestTag = refs.sort((a, b) => new Date(b.object.date) - new Date(a.object.date))[0].ref.replace('refs/tags/', '');
const latestVersion = latestTag.replace('v', '').split('.').map(Number);
const newVersion = newTag.replace('v', '').split('.').map(Number);

// check tag's correct version increase
const isValidVersion = (latestVersion[0] === newVersion[0] && latestVersion[1] === newVersion[1] && newVersion[2] === latestVersion[2] + 1) ||
(latestVersion[0] === newVersion[0] && newVersion[1] === latestVersion[1] + 1 && newVersion[2] === 0) ||
(newVersion[0] === latestVersion[0] + 1 && newVersion[1] === 0 && newVersion[2] === 0);

if (!isValidVersion) {
core.setFailed('New tag is not one version higher than the latest tag');
return;
}
tag-name: ${{ github.event.inputs.tagName }}
# the following step is disabled because it doesn't order the version tags correctly
# - name: Validate format of received tag
# uses: actions/github-script@v7
# with:
# script: |
# const newTag = core.getInput('tag-name');
# const regex = /^v[0-9]+\.[0-9]+\.[0-9]+$/;
#
# if (!regex.test(newTag)) {
# core.setFailed('Tag does not match the required format "v[0-9]+.[0-9]+.[0-9]+"');
# return;
# }
#
# // get all tags
# const { data: refs } = await github.rest.git.listMatchingRefs({
# owner: context.repo.owner,
# repo: context.repo.repo,
# ref: 'tags/'
# });
#
# const latestTag = refs.sort((a, b) => new Date(b.object.date) - new Date(a.object.date))[0].ref.replace('refs/tags/', '');
# const latestVersion = latestTag.replace('v', '').split('.').map(Number);
# const newVersion = newTag.replace('v', '').split('.').map(Number);
#
# // check tag's correct version increase
# const isValidVersion = (latestVersion[0] === newVersion[0] && latestVersion[1] === newVersion[1] && newVersion[2] === latestVersion[2] + 1) ||
# (latestVersion[0] === newVersion[0] && newVersion[1] === latestVersion[1] + 1 && newVersion[2] === 0) ||
# (newVersion[0] === latestVersion[0] + 1 && newVersion[1] === 0 && newVersion[2] === 0);
#
# if (!isValidVersion) {
# core.setFailed('New tag is not one version higher than the latest tag');
# return;
# }
# tag-name: ${{ github.event.inputs.tagName }}

- name: Create and push tag
uses: actions/github-script@v7
Expand Down Expand Up @@ -107,7 +108,7 @@ jobs:
ref: refs/tags/${{ github.event.inputs.tagName }}
- name: Generate release notes
id: generate_release_notes
uses: AbsaOSS/generate-release-notes@v0.2.0
uses: AbsaOSS/generate-release-notes@feature/55-Chapter-line-formatting-authors
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand All @@ -118,8 +119,16 @@ jobs:
{"title": "New Features 🎉", "label": "enhancement"},
{"title": "Bugfixes 🛠", "label": "bug"}
]
duplicity-scope: 'service'
duplicity-icon: '🔁'
warnings: true
skip-release-notes: "no RN"
skip-release-notes-label: "no RN"
print-empty-chapters: false
chapters-to-pr-without-issue: true
row-format-issue: '#_{title}_ {developed-by} {co-authored-by} in $number'
row-format-pr: '#_{title}_ {developed-by} {co-authored-by} in $number'
row-format-link-pr: true

- name: Create draft release
uses: softprops/action-gh-release@v1
env:
Expand Down

This file was deleted.

Loading