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 ## A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs: 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: debug:
needs: create_package # needs: create_package
# The type of runner that the job will run on # The type of runner that the job will run on
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -57,8 +23,8 @@ jobs:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
uses: actions/checkout@v3 uses: actions/checkout@v3
# download artifact in folder artifact/ # # download artifact in folder artifact/
- uses: actions/download-artifact@v3 # - uses: actions/download-artifact@v3
# - name: "install ghostscript" # - name: "install ghostscript"
# run: sudo apt-get install -y ghostscript # run: sudo apt-get install -y ghostscript
@ -82,11 +48,12 @@ jobs:
# with: # with:
# package-file: .github/tex/packages.test.txt # package-file: .github/tex/packages.test.txt
# ## # ##
# - name: "setup TeX Live (via paolobrasolin)" - name: "setup TeX Live (via paolobrasolin)"
# uses: paolobrasolin/setup-texlive-action@v1 uses: paolobrasolin/setup-texlive-action@v1
# with: # with:
# profile-path: ${{ github.workspace }}/.github/tex/profile.minimal.txt # profile-path: ${{ github.workspace }}/.github/tex/profile.minimal.txt
# packages-path: ${{ github.workspace }}/.github/tex/packages.doc.txt # packages-path: ${{ github.workspace }}/.github/tex/packages.doc.txt
- run: tlmgr install ctan-o-mat
# - name: "install tikz-trackschematic" # - name: "install tikz-trackschematic"
# run: ./build.sh --non-interactive --install-dev # run: ./build.sh --non-interactive --install-dev

View File

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

View File

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