Expose basic infos on output to template #40
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
pull_request: | |
branches: [master] | |
push: | |
branches: [master] | |
tags: | |
- v* | |
name: Test | |
jobs: | |
test: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: ConorMacBride/install-package@v1 | |
with: | |
brew: libgfshare | |
apt: libgfshare-bin rpm | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: 'stable' | |
- run: make test | |
- uses: paambaati/codeclimate-action@v3.0.0 | |
if: matrix.os == 'ubuntu-latest' | |
env: | |
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | |
with: | |
prefix: github.com/corvus-ch/horcrux/ | |
coverageLocations: | | |
${{github.workspace}}/c.out:gocov | |
- if: ${{ !startsWith(github.ref, 'refs/tags/v') }} | |
run: echo "flags=--snapshot" >> $GITHUB_ENV | |
- uses: goreleaser/goreleaser-action@v6 | |
if: matrix.os == 'ubuntu-latest' | |
with: | |
args: release --clean ${{ env.flags }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_PAT }} | |
- uses: actions/upload-artifact@v3 | |
if: matrix.os == 'ubuntu-latest' | |
with: | |
path: dist/horcrux_*-* | |
- if: matrix.os == 'ubuntu-latest' && startsWith(github.ref, 'refs/tags/') | |
env: | |
PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }} | |
run: | | |
sudo gem install package_cloud | |
package_cloud push corvus-ch/tools/any/any dist/*.deb | |
package_cloud push corvus-ch/tools/rpm_any/rpm_any dist/*.rpm |