diff --git a/.github/workflows/zip-release.yml b/.github/workflows/zip-release.yml new file mode 100644 index 0000000..5d85e65 --- /dev/null +++ b/.github/workflows/zip-release.yml @@ -0,0 +1,30 @@ +name: Epidoc-C ZIP release + +on: push + +jobs: + build: + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/') + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + path: 'epidoc-c' + - name: Get the file name + id: get_filename + run: | + echo ::set-output name=tag-name::${GITHUB_REF#refs/tags/} + echo ::set-output name=zip-filename::epidoc-c-${GITHUB_REF#refs/tags/}.zip + - name: Archive Release + uses: thedoctor0/zip-release@master + id: create_zip + with: + type: 'zip' + filename: ${{steps.get_filename.outputs.zip-filename}} + exclusions: '*.git*' + - name: Release + uses: softprops/action-gh-release@v1 + with: + files: ${{steps.get_filename.outputs.zip-filename}} + name: epidoc-c-${{steps.get_filename.outputs.tag-name}}