From 2b3c262df35a2e434b8c4c4b6f72e72db50b6b5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Csomor?= Date: Thu, 16 Jul 2020 09:20:05 +0200 Subject: [PATCH] Yml test: test uploading release artifact --- .github/workflows/main.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..e2a2cc4 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,33 @@ +name: CI and Release + +on: + push: + branches: [ yml-test-* ] + +# Recommended here: https://github.com/bazelbuild/bazelisk/issues/88#issuecomment-625178467 +env: + BAZELISK_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + +jobs: + create-release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Build release + run: echo ${{ github.ref }} > ./out.txt + shell: bash + - name: Create GitHub Release + id: create_release + uses: actions/create-release@v1 + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + - name: Upload release artifact + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./out.txt + asset_name: out.txt + # Media type from: https://www.iana.org/assignments/media-types/media-types.xhtml#application + asset_content_type: text/plain