Skip to content

Commit

Permalink
Merge pull request #25 from CptOfEvilMinions/initial-cicd
Browse files Browse the repository at this point in the history
Upadate - 24
  • Loading branch information
CptOfEvilMinions authored Dec 28, 2021
2 parents fc5c992 + 8fb04f0 commit 109fcaa
Showing 1 changed file with 28 additions and 27 deletions.
55 changes: 28 additions & 27 deletions .github/workflows/tagged-releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,40 +29,41 @@ jobs:
######################################## Build osctrl binaries ########################################
- name: Build osctrl-tls
run: GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -o ./bin/osctrl-${{ matrix.components }}-${{ github.ref }}-${{ matrix.goos }}-${{ matrix.goarch }}.bin ./${{ matrix.components }}
create_release:
needs: ['build']
runs-on: ubuntu-20.04
steps:
######################################## Create release ########################################
- name: Create Release
uses: actions/create-release@v1
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
draft: false
prerelease: false
release_name: Release ${{ github.ref }}
tag_name: ${{ github.ref }}
####body_path: ./CHANGELOG.md####
upload_relaese_binaries:
needs: ['build', 'create_release']
needs: ['build']
runs-on: ubuntu-20.04
strategy:
matrix:
components: ['tls', 'admin', 'api', 'cli']
goos: ['linux']
goarch: ['amd64']
steps:
######################################## Add binaries to release ########################################
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./bin/osctrl-${{ matrix.components }}-${{ github.ref }}-${{ matrix.goos }}-${{ matrix.goarch }}.bin
asset_name: osctrl-${{ matrix.components }}-${{ github.ref }}-${{ matrix.goos }}-${{ matrix.goarch }}.bin
asset_content_type: application/x-binary
files: ./bin/osctrl-${{ matrix.components }}-${{ github.ref }}-${{ matrix.goos }}-${{ matrix.goarch }}.bin
######################################## Create release ########################################
# - name: Create Release
# uses: actions/create-release@v1
# id: create_release
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# draft: false
# prerelease: false
# release_name: Release ${{ github.ref }}
# tag_name: ${{ github.ref }}
# ####body_path: ./CHANGELOG.md####
######################################## Add binaries to release ########################################
# - 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 }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
# asset_path: ./bin/osctrl-${{ matrix.components }}-${{ github.ref }}-${{ matrix.goos }}-${{ matrix.goarch }}.bin
# asset_name: osctrl-${{ matrix.components }}-${{ github.ref }}-${{ matrix.goos }}-${{ matrix.goarch }}.bin
# asset_content_type: application/x-binary

0 comments on commit 109fcaa

Please sign in to comment.