Skip to content

Commit

Permalink
releasing assets
Browse files Browse the repository at this point in the history
  • Loading branch information
rbizos committed Dec 26, 2022
1 parent 78bd567 commit 83a93b8
Showing 1 changed file with 34 additions and 21 deletions.
55 changes: 34 additions & 21 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: Builds and Releases
name: Builds and Releases on tag

on:
release:
types: [published]
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

jobs:
build:
Expand All @@ -14,28 +16,39 @@ jobs:
uses: actions/setup-go@v3
with:
go-version: '>=1.12.0'

- name: Build
run: make

- name: Test
run: make test

- name: Bundle
run: tar cvzf carbon-relay-ng-${{github.ref_name}}-linux-amd64.tar.gz carbon-relay-ng

- name: Checksum
run: echo `sha256sum carbon-relay-ng-*.tar.gz` > sha256


- name: Publish Artifact
uses: actions/upload-artifact@v3
run: |
tar cvzf carbon-relay-ng-${{github.ref_name}}-linux-amd64.tar.gz carbon-relay-ng
echo `sha256sum carbon-relay-ng-*.tar.gz` > sha256
- 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
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: carbon-relay-ng-${{github.ref_name}}-linux-amd64.tar.gz
path: carbon-relay-ng-${{github.ref_name}}-linux-amd64.tar.gz

- name: Publish Checksum
uses: actions/upload-artifact@v3
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./carbon-relay-ng-${{github.ref_name}}-linux-amd64.tar.gz
asset_name: carbon-relay-ng-${{github.ref_name}}-linux-amd64.tar.gz
- name: Upload Release Asset checksum
id: upload-release-asset-checksum
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: sha256
path: sha256
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./sha256
asset_name: sha256

0 comments on commit 83a93b8

Please sign in to comment.