Skip to content

Upload Release Asset #8

Upload Release Asset

Upload Release Asset #8

Workflow file for this run

name: Upload Release Asset
on:
push:
tags:
- "v*"
jobs:
main:
name: Upload Release Asset
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: '11'
- name: Build project
run: |
./gradlew :projector-client-web:browserProductionWebpack
cd projector-client-web/build/distributions
zip -r ../projector-client-web-distribution.zip . -x *.map
- 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 }}
draft: false
prerelease: false
body: Changelog is available in the server-side [CHANGELOG.md](https://github.com/JetBrains/projector-server/blob/master/projector-server/CHANGELOG.md).
- name: Tag name # Inspired from https://github.community/t/how-to-get-just-the-tag-name/16241/11
id: tag_name
run: echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: projector-client-web/build/projector-client-web-distribution.zip
asset_name: projector-client-web-distribution-${{ steps.tag_name.outputs.SOURCE_TAG }}.zip
asset_content_type: application/zip