generate tzdb #802
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: generate tzdb | |
on: | |
push: | |
branches: main | |
workflow_dispatch: | |
jobs: | |
setup: | |
runs-on: ubuntu-latest | |
outputs: | |
VERSION: ${{ steps.version.outputs.VERSION }} | |
steps: | |
- name: checkout code | |
uses: actions/checkout@v2 | |
with: | |
persist-credentials: false | |
- id: version | |
name: get version | |
run: | | |
python3 scripts/version.py | |
VERSION="$(cat /tmp/version)" | |
echo "tmp file version: $VERSION" | |
echo "::set-output name=VERSION::$VERSION" | |
shell: bash | |
build: | |
runs-on: ubuntu-latest | |
needs: [setup] | |
env: | |
VERSION: ${{ needs.setup.outputs.VERSION }} | |
steps: | |
- name: checkout code | |
uses: actions/checkout@v2 | |
with: | |
persist-credentials: false | |
- name: build tzdata | |
if: ${{ env.VERSION }} | |
run: | | |
bash scripts/build.sh ${{env.VERSION}} | |
- name: upload tzdb | |
if: ${{ env.VERSION }} | |
uses: actions/upload-artifact@master | |
with: | |
name: ${{env.VERSION}}_zoneinfo.zip | |
path: ${{github.workspace}}/${{env.VERSION}}_zoneinfo.zip | |
- name: release version | |
if: ${{ env.VERSION }} | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.TOKEN }} | |
file: ${{github.workspace}}/${{env.VERSION}}_zoneinfo.zip | |
asset_name: ${{env.VERSION}}_zoneinfo.zip | |
tag: ${{env.VERSION}} | |
overwrite: true | |
body: "release tzdb ${{env.VERSION}}" |