|
| 1 | +name: publish |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + tags: |
| 6 | + - '*' |
| 7 | + |
| 8 | +jobs: |
| 9 | + build: |
| 10 | + runs-on: ubuntu-latest |
| 11 | + steps: |
| 12 | + - name: Check out the repository |
| 13 | + uses: actions/checkout@v4 |
| 14 | + with: |
| 15 | + path: gitinfo-lua |
| 16 | + fetch-tags: true |
| 17 | + fetch-depth: 0 |
| 18 | + - name: Check out texmf |
| 19 | + uses: actions/checkout@v4 |
| 20 | + with: |
| 21 | + repository: Xerdi/texmf-packaging |
| 22 | + path: texmf |
| 23 | + - name: Run the build process with Docker |
| 24 | + uses: addnab/docker-run-action@v3 |
| 25 | + with: |
| 26 | + image: maclotsen/texlive:with-gf |
| 27 | + shell: bash |
| 28 | + options: --rm -i -v ${{ github.workspace }}/texmf:/root/texmf -v ${{ github.workspace }}:/build |
| 29 | + run: | |
| 30 | + git config --global --add safe.directory /build/gitinfo-lua |
| 31 | + make -C gitinfo-lua package |
| 32 | + - name: Create Release |
| 33 | + id: create_release |
| 34 | + uses: actions/create-release@v1 |
| 35 | + env: |
| 36 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 37 | + with: |
| 38 | + tag_name: ${{ github.ref }} |
| 39 | + release_name: Release ${{ github.ref_name }} |
| 40 | + draft: true |
| 41 | + body: | |
| 42 | + Release for version ${{ github.ref_name }} |
| 43 | + - name: 'Upload Release Asset: Tar' |
| 44 | + id: upload_release_asset_tar |
| 45 | + uses: actions/upload-release-asset@v1 |
| 46 | + env: |
| 47 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 48 | + with: |
| 49 | + upload_url: ${{ steps.create_release.outputs.upload_url }} |
| 50 | + asset_path: ${{ github.workspace }}/gitinfo-lua/gitinfo-lua-${{ github.ref_name }}.tar.gz |
| 51 | + asset_name: gitinfo-lua-${{ github.ref_name }}.tar.gz |
| 52 | + asset_content_type: application/gzip |
| 53 | + - name: 'Upload Release Asset: Manual' |
| 54 | + id: upload_release_asset_manual |
| 55 | + uses: actions/upload-release-asset@v1 |
| 56 | + env: |
| 57 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 58 | + with: |
| 59 | + upload_url: ${{ steps.create_release.outputs.upload_url }} |
| 60 | + asset_path: ${{ github.workspace }}/gitinfo-lua/doc/gitinfo-lua.pdf |
| 61 | + asset_name: gitinfo-lua-${{ github.ref_name }}.pdf |
| 62 | + asset_content_type: application/pdf |
0 commit comments