enable zenodo upload
parent
ae8ed95aee
commit
162d59e14a
|
@ -57,8 +57,9 @@ jobs:
|
|||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
uses: actions/checkout@v2
|
||||
|
||||
# download artifact in folder artifact/
|
||||
- uses: actions/download-artifact@v3
|
||||
id: download
|
||||
- run: cd artifact
|
||||
|
||||
# - name: "install ghostscript"
|
||||
# run: sudo apt-get install -y ghostscript
|
||||
|
|
|
@ -48,12 +48,12 @@ jobs:
|
|||
# 6. upload artifact to share it with other jobs
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
path: tikz-trackschematic-v0.7.0.zip
|
||||
path: tikz-trackschematic-${{ steps.tag.outputs.tag }}.zip
|
||||
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
path: release-note-v0.7.0.md
|
||||
path: release-note-${{ steps.tag.outputs.tag }}.md
|
||||
if-no-files-found: warn # 'error' or 'ignore' are also available, defaults to `warn`
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
|
@ -71,7 +71,10 @@ jobs:
|
|||
name: "publish on github"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# 1. get varibale ${{ steps.tag.outputs.tag }}
|
||||
# 1. download artifact in folder artifact/
|
||||
- uses: actions/download-artifact@v3
|
||||
|
||||
# 2. get varibale ${{ steps.tag.outputs.tag }}
|
||||
- name: "get tag"
|
||||
id: tag
|
||||
uses: dawidd6/action-get-tag@v1
|
||||
|
@ -79,9 +82,6 @@ jobs:
|
|||
# Optionally strip `v` prefix
|
||||
strip_v: false
|
||||
|
||||
# 2. download artifact in folder artifact/
|
||||
- uses: actions/download-artifact@v3
|
||||
|
||||
# 3. publish package as new release on github
|
||||
- name: "create release"
|
||||
id: create_release
|
||||
|
@ -119,6 +119,9 @@ jobs:
|
|||
steps:
|
||||
# 1. download artifact in folder artifact/
|
||||
- uses: actions/download-artifact@v3
|
||||
- run: |
|
||||
mv ./artifact/tikz-trackschematic-*.zip ./
|
||||
mv ./artifact/tikz-trackschematic.pkg ./
|
||||
|
||||
# 2. install ctan-o-mat
|
||||
- name: "setup TeX Live (via paolobrasolin)"
|
||||
|
@ -129,4 +132,43 @@ jobs:
|
|||
|
||||
# 3. upload new release to CTAN
|
||||
- name: CTAN submit
|
||||
run: ctan-o-mat --verbose --submit artifact/tikz-trackschematic.pkg
|
||||
run: ctan-o-mat --verbose --submit tikz-trackschematic.pkg
|
||||
|
||||
publish_zenodo:
|
||||
needs: create_package
|
||||
name: "publish on zenodo sandbox"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# 1. get varibale ${{ steps.tag.outputs.tag }}
|
||||
- name: "get tag"
|
||||
id: tag
|
||||
uses: dawidd6/action-get-tag@v1
|
||||
with:
|
||||
# Optionally strip `v` prefix
|
||||
strip_v: false
|
||||
|
||||
# 2. checkout the repo for zenodraft/action@0.10.0 to work
|
||||
- name: "checkout"
|
||||
uses: actions/checkout@v2
|
||||
|
||||
# 3. download artifact in folder artifact/ and move it one level up
|
||||
- uses: actions/download-artifact@v3
|
||||
- run: |
|
||||
mv ./artifact/tikz-trackschematic-*.zip ./
|
||||
mv ./artifact/metadata.json ./
|
||||
|
||||
# 4. upload to zenodo
|
||||
- name: "uploading to zenodo sandbox"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
ZENODO_ACCESS_TOKEN: ${{ secrets.ZENODO_ACCESS_TOKEN }}
|
||||
uses: zenodraft/action@0.10.0
|
||||
with:
|
||||
collection: 5539844
|
||||
filenames: tikz-trackschematic-${{ steps.tag.outputs.tag }}.zip
|
||||
upsert-doi: true
|
||||
upsert-location: identifiers[1]
|
||||
metadata: metadata.json
|
||||
publish: true
|
||||
sandbox: false
|
||||
verbose: true
|
|
@ -53,6 +53,9 @@ jobs:
|
|||
|
||||
# download artifact in folder artifact/
|
||||
- uses: actions/download-artifact@v3
|
||||
- run: |
|
||||
mv ./artifact/tikz-trackschematic-*.zip ./
|
||||
mv ./artifact/metadata.json ./
|
||||
|
||||
- name: "uploading to zenodo sandbox"
|
||||
env:
|
||||
|
@ -63,10 +66,10 @@ jobs:
|
|||
with:
|
||||
# collection: 5539844
|
||||
collection: 1047380
|
||||
filenames: artifact/tikz-trackschematic-v0.7.0.zip
|
||||
filenames: tikz-trackschematic-v0.7.0.zip
|
||||
upsert-doi: true
|
||||
upsert-location: identifiers[2]
|
||||
metadata: artifact/metadata.json
|
||||
upsert-location: identifiers[1]
|
||||
metadata: metadata.json
|
||||
publish: true
|
||||
sandbox: true
|
||||
verbose: true
|
|
@ -40,5 +40,5 @@ keywords:
|
|||
- tracks
|
||||
- schematics
|
||||
license: ISC
|
||||
version: v0.6.3
|
||||
date-released: '2022-02-15'
|
||||
version: v0.7.0
|
||||
date-released: '2022-04-02'
|
||||
|
|
|
@ -21,9 +21,9 @@ Please note we have a code of conduct, please follow it in all your interactions
|
|||
3. The versioning scheme we use is [SemVer](http://semver.org/). Increase the version numbers in the following files to the new version that this Pull Request would represent:
|
||||
1. CHANGELOG.md
|
||||
2. doc/versionhistory.tex
|
||||
3. CITATION.cff
|
||||
4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you
|
||||
do not have permission to do that, you may request the second reviewer to merge it for you.
|
||||
5. The following versioning steps will be taken care of by the maintainer:
|
||||
1. git repo with tag
|
||||
2. CITATION.cff including DOI for current version
|
||||
3. sync Overleaf project
|
||||
2. sync Overleaf project
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# TikZ-trackschematic
|
||||
|
||||
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5539844.svg)](https://doi.org/10.5281/zenodo.5539844) [![continuous integration test](https://github.com/railtoolkit/tikz-trackschematic/actions/workflows/testing.yml/badge.svg)](https://github.com/railtoolkit/tikz-trackschematic/actions/workflows/testing.yml)
|
||||
[![License: ISC](https://img.shields.io/badge/license-ISC-green.svg)](https://opensource.org/licenses/ISC) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5539844.svg)](https://doi.org/10.5281/zenodo.5539844) [![continuous integration test](https://github.com/railtoolkit/tikz-trackschematic/actions/workflows/testing.yml/badge.svg)](https://github.com/railtoolkit/tikz-trackschematic/actions/workflows/testing.yml)
|
||||
|
||||
------------
|
||||
|
||||
|
|
47
build.sh
47
build.sh
|
@ -453,26 +453,52 @@ check_changelog() {
|
|||
exit 1
|
||||
}
|
||||
|
||||
check_citation() {
|
||||
# check if $VERSION is present in CITATION.cff
|
||||
STATUS=0
|
||||
grep -qs "version: $VERSION_STR" CITATION.cff || STATUS=1
|
||||
if [ $STATUS = 0 ]; then
|
||||
log_note "Version $VERSION_STR is present in CITATION.cff."
|
||||
return 0
|
||||
fi
|
||||
|
||||
log_error "Version $VERSION_STR not found in CITATION.cff. \
|
||||
Be sure to edit CITATION.cff and specify current version!"
|
||||
exit 1
|
||||
}
|
||||
|
||||
check_date() {
|
||||
## extract DATE from versionhistory.tex and CHANGELOG.md
|
||||
## extract DATE from versionhistory.tex, CHANGELOG.md, and CITATION.cff
|
||||
# fallback: DATE=$(date "+%Y-%m-%d")
|
||||
#
|
||||
STATUS=0
|
||||
#
|
||||
LINE_1=$(grep "vhEntry{$VERSION_NUM" doc/versionhistory.tex)
|
||||
LINE_2=$(grep "Version \[$VERSION_NUM\]" CHANGELOG.md)
|
||||
LINE_3=$(grep "date-released:" CITATION.cff)
|
||||
DATEISO_1=$(echo $LINE_1 | egrep -o '[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])')
|
||||
DATEISO_2=$(echo $LINE_2 | egrep -o '[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])')
|
||||
DATEISO_3=$(echo $LINE_3 | egrep -o '[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])')
|
||||
|
||||
if [ $DATEISO_1 = $DATEISO_2 ]; then
|
||||
# DATE=$(date "+%Y-%m-%d")
|
||||
if [ $DATEISO_1 != $DATEISO_2 ]; then
|
||||
STATUS=1
|
||||
fi
|
||||
if [ $DATEISO_1 != $DATEISO_3 ]; then
|
||||
STATUS=1
|
||||
fi
|
||||
|
||||
if [ $STATUS = 0 ]; then
|
||||
DATE="$DATEISO_1"
|
||||
log_note "The date $DATE was extracted from versionhistory.tex and CHANGELOG.md."
|
||||
return 0
|
||||
fi
|
||||
|
||||
log_error "The date in versionhistory.tex and CHANGELOG.md did not match.\
|
||||
Be sure to edit versionhistory.tex or CHANGELOG.md and modifiy the date!"
|
||||
log_error "The date in versionhistory.tex, CHANGELOG.md, and CITATION.cff did not match.\
|
||||
Be sure to edit versionhistory.tex, CHANGELOG.md, or CITATION.cff and modifiy the date!"
|
||||
exit 1
|
||||
}
|
||||
|
||||
check_url1() {
|
||||
check_changelog_url1() {
|
||||
## extract urls from CHANGELOG.md
|
||||
STATUS=0
|
||||
LINE=$(grep "\[$VERSION_NUM\]: https://" CHANGELOG.md)
|
||||
|
@ -487,7 +513,7 @@ check_url1() {
|
|||
exit 1
|
||||
}
|
||||
|
||||
check_url2() {
|
||||
check_changelog_url2() {
|
||||
## extract urls from CHANGELOG.md
|
||||
STATUS=0
|
||||
LINE=$(grep "\[Unreleased\]: https://" CHANGELOG.md)
|
||||
|
@ -1049,11 +1075,12 @@ if [ $RELEASE = 1 ]; then
|
|||
## check if version ist in the correct format
|
||||
check_version_number
|
||||
|
||||
## check if $VERSION is present in CHANGELOG.md and versionhistory.tex
|
||||
## check if $VERSION is present in CHANGELOG.md, versionhistory.tex, and CITATION.cff
|
||||
check_versionhistory
|
||||
check_changelog
|
||||
check_url1
|
||||
check_url2
|
||||
check_changelog_url1
|
||||
check_changelog_url2
|
||||
check_citation
|
||||
check_date
|
||||
|
||||
## check for installed software
|
||||
|
|
Loading…
Reference in New Issue