From 3edfaafd9c7ae763f63388dfe18cfa2b6782f9ee Mon Sep 17 00:00:00 2001 From: Marcus Talken Date: Sat, 14 Nov 2020 03:42:42 +0000 Subject: [PATCH] Create Release --- .github/dependabot.yml | 7 ++++ .github/workflows/go.yml | 36 ++++++++++++++++ .github/workflows/release.yml | 77 +++++++++++++++++++++++++++++++++++ CHANGELOG.md | 32 +++++++++++---- 4 files changed, 144 insertions(+), 8 deletions(-) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/go.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..d921d0f --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +version: 2 +updates: +- package-ecosystem: gomod + directory: "/" + schedule: + interval: daily + open-pull-requests-limit: 10 diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..1c5b486 --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,36 @@ +name: Go + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + + build: + name: Build + runs-on: ubuntu-latest + steps: + + - name: Set up Go 1.x + uses: actions/setup-go@v2 + with: + go-version: ^1.13 + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: Get dependencies + run: | + go get -v -t -d ./... + if [ -f Gopkg.toml ]; then + curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh + dep ensure + fi + + - name: Build + run: go build -v . + + - name: Test + run: go test -v . diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..4ceda12 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,77 @@ +on: + push: + # Sequence of patterns matched against refs/tags + tags: + - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 + +name: Create Release + +jobs: + build: + name: Create Release + runs-on: ubuntu-latest + steps: + - name: Get version from tag + id: tag_name + run: | + echo ::set-output name=current_version::${GITHUB_REF#refs/tags/v} + - name: Checkout code + uses: actions/checkout@v2 + - name: Get Changelog Entry + id: changelog_reader + uses: mindsers/changelog-reader-action@v2 + with: + version: ${{ steps.tag_name.outputs.current_version }} + path: ./CHANGELOG.md + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + with: + tag_name: ${{ steps.changelog_reader.outputs.version }} + release_name: Release ${{ steps.changelog_reader.outputs.version }} + body: ${{ steps.changelog_reader.outputs.changes }} + prerelease: ${{ steps.changelog_reader.outputs.status == 'prereleased' }} + draft: ${{ steps.changelog_reader.outputs.status == 'unreleased' }} + - name: Set up Go 1.x + uses: actions/setup-go@v2 + with: + go-version: ^1.13 + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: Get dependencies + run: | + go get -v -t -d ./... + if [ -f Gopkg.toml ]; then + curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh + dep ensure + fi + + - name: Build Linux + run: go build -o amongusmumble-x64-${{ github.ref }} + - name: Upload Linux Build + id: upload-release-asset-linux + 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: ./amongusmumble-x64-${{ github.ref }} + asset_name: amongusmumble-x64-${{ github.ref }} + asset_content_type: application/octet-stream + + - name: Build Windows + run: GOOS=windows go build -o amongusmumble-x64-${{ github.ref }}.exe + - name: Upload Windows Build + id: upload-release-asset-windows + 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: ./amongusmumble-x64-${{ github.ref }}.exe + asset_name: amongusmumble-x64-${{ github.ref }}.exe + asset_content_type: application/octet-stream \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index cab40bd..554bace 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,13 +1,29 @@ -# Change Log +# Changelog +All notable changes to this project will be documented in this file. -## v0.2.0 +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -### Changes -- Updated README to include setup instructions. -### New Features -- Allow passing botname, cert, key, server as parameters. +## [Unreleased] +### Added +- game names are now checked case insensitive +- if no comment set, use mumble name + +### Changed +### Deprecated +### Removed +### Fixed +### Security + +## [0.2.0] +### Added +- Allow passing botname, cert, key, server as parameters from config file. + +### Changed +- Updated README to include setup instructions. -## v0.1.0 -- Initial Release \ No newline at end of file +## [0.1.0] +### Added +- Initial Release