Compare commits

...

4 Commits

3 changed files with 27 additions and 59 deletions

View File

@ -12,42 +12,8 @@ on:
## A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
create_package:
name: "create a TeX Live package"
runs-on: ubuntu-latest
steps:
# checkout the repo
- name: "checkout"
uses: actions/checkout@v3
# create package and release notes
- name: "create tikz-trackschematic package"
run: ./build.sh --non-interactive --release v0.7.0
# upload artifact two share it with other jobs
- uses: actions/upload-artifact@v3
with:
path: tikz-trackschematic-v0.7.0.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
if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn`
- uses: actions/upload-artifact@v3
with:
path: .github/tex/tikz-trackschematic.pkg
if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn`
- uses: actions/upload-artifact@v3
with:
path: .github/zenodo/metadata.json
if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn`
# This workflow contains a single job called "build"
debug:
needs: create_package
# needs: create_package
# The type of runner that the job will run on
runs-on: ubuntu-latest
@ -57,8 +23,8 @@ jobs:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
uses: actions/checkout@v3
# download artifact in folder artifact/
- uses: actions/download-artifact@v3
# # download artifact in folder artifact/
# - uses: actions/download-artifact@v3
# - name: "install ghostscript"
# run: sudo apt-get install -y ghostscript
@ -82,11 +48,12 @@ jobs:
# with:
# package-file: .github/tex/packages.test.txt
# ##
# - name: "setup TeX Live (via paolobrasolin)"
# uses: paolobrasolin/setup-texlive-action@v1
- name: "setup TeX Live (via paolobrasolin)"
uses: paolobrasolin/setup-texlive-action@v1
# with:
# profile-path: ${{ github.workspace }}/.github/tex/profile.minimal.txt
# packages-path: ${{ github.workspace }}/.github/tex/packages.doc.txt
- run: tlmgr install ctan-o-mat
# - name: "install tikz-trackschematic"
# run: ./build.sh --non-interactive --install-dev

View File

@ -116,9 +116,7 @@ jobs:
# 2. install ctan-o-mat
- name: "setup TeX Live (via paolobrasolin)"
uses: paolobrasolin/setup-texlive-action@v1
with:
profile-path: ${{ github.workspace }}/.github/tex/profile.minimal.txt
packages-path: ${{ github.workspace }}/.github/tex/packages.upload.txt
- run: tlmgr install ctan-o-mat
# 3. upload new release to CTAN
- name: CTAN submit
@ -147,7 +145,7 @@ jobs:
ZENODO_ACCESS_TOKEN: ${{ secrets.ZENODO_ACCESS_TOKEN }}
COLLECTION: 5539844
run: |
ID=$(zenodraft deposition create in-existing-collection $COLLECTION)
ID=$(zenodraft deposition create version $COLLECTION)
zenodraft file add $ID tikz-trackschematic-*.zip
zenodraft metadata update $ID artifact/metadata.json
zenodraft deposition publish $ID
@ -161,28 +159,31 @@ jobs:
# 1. checkout the repo
- name: "checkout"
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
# 2. update CITATION.cff
- run: ./build.sh --update-cite ${{needs.publish_zenodo.outputs.doi}}
# 3. push the change back to master
- name: push
run: |
git config user.name railtoolkit
git config user.email railtoolkit@ownx.net
git add CITATION.cff
git commit -m "DOI updated to ${{needs.create_package.outputs.version}} (via github action)"
git push
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "DOI updated to ${{needs.create_package.outputs.version}} (via github action)"
branch: master
file_pattern: CITATION.cff
commit_user_name: railtoolkit
commit_user_email: railtoolkit@ownx.net
publish_twitter:
needs: [create_package, publish_zenodo]
name: "tweet about it!"
runs-on: ubuntu-latest
steps:
- uses: devigned/go-twitter-action@v1
- uses: infraway/tweet-action@v1
with:
message: "The version ${{needs.create_package.outputs.version}} of TikZ-trackschematic is available! DOI: https://doi.org/${{needs.publish_zenodo.outputs.doi}}"
apiKey: ${{ secrets.TWITTER_API_KEY }}
apiKeySecret: ${{ secrets.TWITTER_API_SECRET }}
accessToken: ${{ secrets.TWITTER_ACCESS_TOKEN }}
accessTokenSecret: ${{ secrets.TWITTER_ACCESS_SECRET }}
status: "The version ${{needs.create_package.outputs.version}} of TikZ-trackschematic is available! DOI: https://doi.org/${{needs.publish_zenodo.outputs.doi}}"
api_key: ${{ secrets.TWITTER_API_KEY }}
api_key_secret: ${{ secrets.TWITTER_API_KEY_SECRET }}
access_token: ${{ secrets.TWITTER_ACCESS_TOKEN }}
access_token_secret: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}

View File

@ -17,7 +17,7 @@ identifiers:
value: 10.5281/zenodo.5539844
description: 'Collection of archived snapshots of all versions of the library'
- type: doi
value: 10.5281/zenodo.6418404
value: 10.5281/zenodo.6607601
description: Current version
url: 'https://www.railtoolkit.org/projects/tikz-trackschematic/'
repository: 'https://github.com/railtoolkit/tikz-trackschematic'
@ -40,5 +40,5 @@ keywords:
- tracks
- schematics
license: ISC
version: v0.7.0
date-released: 2022-04-02
version: v0.7.1
date-released: 2022-06-02