use worktree for building #282
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 and run on GitHub Actions | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - '**' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| submodules: true | |
| - name: Fetch all tags | |
| run: git fetch --tags | |
| - name: Install dependencies | |
| run: sudo apt-get update && sudo apt-get install -y libglib2.0-dev | |
| - name: Configure git | |
| run: | | |
| git config --global user.name 'GitHub Actions' | |
| git config --global user.email '[email protected]' | |
| - name: Run the build script | |
| run: ./build.sh | |
| - name: Push changes | |
| run: | | |
| git push --tags | |
| - name: Archive artifacts if any | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: tzdbics_${{ env.VZIC_RELEASE_NAME }} | |
| if-no-files-found: ignore |