Skip to content

Commit

Permalink
Add a publish step
Browse files Browse the repository at this point in the history
  • Loading branch information
DeltaEvo committed Jan 23, 2021
1 parent b7b0cc0 commit a1bd905
Showing 1 changed file with 51 additions and 1 deletion.
52 changes: 51 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
name: CI

on: [push]
on:
push:
branches:
- '*'
tags:
- v*
pull_request:
branches:
- master

jobs:
build-linux:
Expand Down Expand Up @@ -64,3 +72,45 @@ jobs:
with:
name: windows
path: dissector/packet-minecraft.dll

publish:
needs: [build-linux, build-windows]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Download linux artifact
uses: actions/download-artifact@v2
with:
name: linux
- name: Download windows artifact
uses: actions/download-artifact@v2
with:
name: windows
- 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 packet-minecraft.so
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./packet-minecraft.so
asset_name: packet-minecraft.so
asset_content_type: application/octet-stream
- name: Upload packet-minecraft.dll
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./packet-minecraft.dll
asset_name: packet-minecraft.dll
asset_content_type: application/octet-stream

0 comments on commit a1bd905

Please sign in to comment.