MakeColors/.github/workflows/release.yml

33 lines
913 B
YAML
Raw Normal View History

2020-12-30 21:33:17 +01:00
on:
release:
types: [created]
name: Upload tarball for release
jobs:
upload-release:
name: Upload Release Asset
runs-on: ubuntu-latest
steps:
- name: Set release tarball name
2020-12-30 21:39:19 +01:00
run: |
echo "TARBALL_NAME=$(echo MakeColors-${GITHUB_REF##*/v})" >> $GITHUB_ENV
2020-12-30 21:33:17 +01:00
- name: Checkout code
uses: actions/checkout@v2
- name: Pack tarball
run: |
git archive HEAD --prefix=${{ env.TARBALL_NAME }}/ | bzip2 > ${{ env.TARBALL_NAME }}.tar.bz2
- name: Upload Release Asset
id: upload
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./${{ env.TARBALL_NAME }}.tar.bz2
asset_name: ${{ env.TARBALL_NAME }}.tar.bz2
asset_content_type: application/x-bzip2