Skip to content
This repository has been archived by the owner on Jan 15, 2022. It is now read-only.

Commit

Permalink
add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
subosito committed Oct 13, 2020
1 parent e493eae commit cdd6076
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Release
on:
push:
tags:
- '*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/create-release@v1
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
- run: echo "${{ steps.create_release.outputs.upload_url }}" > release_url.txt
- uses: actions/upload-artifact@v2
with:
name: release_url
path: release_url.txt
publish:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.15'
- uses: actions/download-artifact@v2
with:
name: release_url
path: .
- run: make submodules
- run: make drafter
- run: make plugin
- id: get_upload_url
run: echo ::set-output name=upload_url::$(cat release_url.txt)
- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_upload_url.outputs.upload_url }}
asset_path: ./drafter.so
asset_name: drafter-${{ github.ref }}-${{ matrix.os }}.so
asset_content_type: application/octet-stream

0 comments on commit cdd6076

Please sign in to comment.