Update THIRD_PARTY_LICENSES tool #201
This file contains hidden or 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: build-tzpb | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| inputs: | |
| timezone-boundary-version: | |
| description: "Timezone boundary version to use" | |
| required: false | |
| default: "2025b" | |
| jobs: | |
| build-tzpb-pipeline: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| - name: Fetch latest tag | |
| id: set-latest-version | |
| run: | | |
| go run ./cmd/checkboundaryrelease/main.go --force >> $GITHUB_OUTPUT | |
| - name: Set latest tag to env | |
| if: ${{ github.event.inputs.timezone-boundary-version == '' }} | |
| run: | | |
| echo TIMEZONE_BOUNDARY_VERSION=${{ steps.set-latest-version.outputs.TIMEZONE_BOUNDARY_VERSION }} >> $GITHUB_ENV | |
| - name: Set tag when provided | |
| if: ${{ github.event.inputs.timezone-boundary-version != '' }} | |
| run: | | |
| echo TIMEZONE_BOUNDARY_VERSION=${{ github.event.inputs.timezone-boundary-version }} >> $GITHUB_ENV | |
| - name: Download files | |
| run: | | |
| wget https://github.com/evansiroky/timezone-boundary-builder/releases/download/${TIMEZONE_BOUNDARY_VERSION}/timezones-with-oceans.geojson.zip | |
| ls -alh | |
| unzip timezones-with-oceans.geojson.zip | |
| ls -alh | |
| mkdir data | |
| ls -alh | |
| cp combined-with-oceans.json data/ | |
| - name: Install geojson2tzpb | |
| run: cd cmd/geojson2tzpb;go install | |
| - name: Install reducetzpb | |
| run: cd cmd/reducetzpb;go install | |
| - name: Install compresstzpb | |
| run: cd cmd/compresstzpb;go install | |
| - name: Install preindextzpb | |
| run: cd cmd/preindextzpb;go install | |
| - name: Convert GeoJSON to pb | |
| run: | | |
| geojson2tzpb data/combined-with-oceans.json | xargs reducetzpb | xargs compresstzpb | |
| preindextzpb data/combined-with-oceans.reduce.bin | |
| ls -alh data/ | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: combined-with-oceans.bin | |
| path: | | |
| data/combined-with-oceans.bin | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: combined-with-oceans.reduce.bin | |
| path: | | |
| data/combined-with-oceans.reduce.bin | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: combined-with-oceans.reduce.compress.bin | |
| path: | | |
| data/combined-with-oceans.reduce.compress.bin | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: combined-with-oceans.reduce.preindex.bin | |
| path: | | |
| data/combined-with-oceans.reduce.preindex.bin |