Skip to content

release

release #22

Workflow file for this run

name: release
on:
workflow_dispatch:
inputs:
tag:
description: 'Annotated tag name'
required: true
message:
description: 'Annotated tag message'
required: true
jobs:
create_tag:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git tag -a ${{ github.event.inputs.tag }} -m "${{ github.event.inputs.message }}"
git push origin ${{ github.event.inputs.tag }}
package:
needs:
- create_tag
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: refs/tags/${{ github.event.inputs.tag }}
- name: create artifact tar
run: |
tar -cvzf unlocodes.tar.gz vocab/
- name: upload build details
uses: actions/upload-artifact@v3
with:
name: unlocodes_artifact
path: unlocodes.tar.gz
release_tag:
needs:
- package
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: refs/tags/${{ github.event.inputs.tag }}
- name: Get vocabulary
uses: actions/download-artifact@v3
with:
name: unlocodes_artifact
path: ./
- name: extract artifact
run: |
tar -zxvf unlocodes.tar.gz
- name: Create Releases
uses: ncipollo/release-action@v1
with:
tag: ${{ github.event.inputs.tag }}
artifacts: 'vocab/*.jsonld,vocab/*diff.txt'
token: ${{ secrets.GITHUB_TOKEN }}
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.PAT_TOKEN }}
repository: uncefact/vocabulary-outputs
event-type: update-unlocodes