summaryrefslogtreecommitdiff
path: root/.github/workflows/release.yml
blob: 3089ccdb8584155cebcd2508a2c9ce208c664977 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Release

on:
  release:
    types: [created]

jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - name: Create Docker image
        run: docker build . -t asciidoc

      - name: Build distributions
        run: docker run --rm -v $(pwd):/srv/asciidoc asciidoc /bin/bash -c "make dist"

      - name: Upload asciidoc-${{ github.event.release.tag_name }}.zip
        id: upload-release-asset-zip
        uses: actions/upload-release-asset@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          upload_url: ${{ github.event.release.upload_url }}
          asset_path: ./asciidoc-${{ github.event.release.tag_name }}.zip
          asset_name: asciidoc-${{ github.event.release.tag_name }}.zip
          asset_content_type: application/zip

      - name: Upload asciidoc-${{ github.event.release.tag_name }}.tar.gz
        id: upload-release-asset-tar
        uses: actions/upload-release-asset@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          upload_url: ${{ github.event.release.upload_url }}
          asset_path: ./asciidoc-${{ github.event.release.tag_name }}.tar.gz
          asset_name: asciidoc-${{ github.event.release.tag_name }}.tar.gz
          asset_content_type: application/gzip