Fix release action (#1401)

* correctly output file content

* trigger on version tags

* install gettext

* do not allow manual releases

* use maintained release action
This commit is contained in:
Kyle Robbertze 2021-10-15 14:50:18 +00:00 committed by GitHub
parent 9e9f6b433a
commit 9f1e41e6fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 28 deletions

View File

@ -3,8 +3,7 @@ name: Release
on: on:
push: push:
tags: tags:
- '\d+.\d+.\d+(-\w+\.\d+)*' - "[0-9]+.[0-9]+.[0-9]+*"
workflow_dispatch:
jobs: jobs:
release: release:
@ -15,34 +14,18 @@ jobs:
with: with:
php-version: 7.4 php-version: 7.4
- name: Read file contents - name: Install dependencies
id: release_notes_file run: |
uses: andstor/file-reader-action@v1 sudo apt-get update
with: DEBIAN_FRONTEND=noninteractive sudo apt-get install -y gettext
path: ./.github/RELEASE.md
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: ${ steps.release_notes_file.outputs.contents }
draft: true
prerelease: true
- name: Build tarball - name: Build tarball
run: make tarball run: make tarball
- name: Upload Release Asset - name: Create Release
id: upload-release-asset uses: softprops/action-gh-release@v1
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
upload_url: ${{ steps.create_release.outputs.upload_url }} body_path: .github/RELEASE.md
asset_path: libretime-${{ github.ref }}.tar.gz draft: true
asset_name: libretime-${{ github.ref }}.tar.gz prerelease: true
asset_content_type: application/tgz files: libretime-*.tar.gz