From 84e630ecadac3e9f77d3826cef96a3c405428708 Mon Sep 17 00:00:00 2001 From: Ted Pearson <1477390+tedpearson@users.noreply.github.com> Date: Mon, 5 Dec 2022 18:39:09 -0500 Subject: [PATCH] use workflow template --- .github/workflows/release.yaml | 51 ++-------------------------------- 1 file changed, 3 insertions(+), 48 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index f9feb45..8998c18 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -8,51 +8,6 @@ on: jobs: build: - name: Build - strategy: - matrix: - GOOS: [ linux, darwin ] - GOARCH: [ arm, arm64, amd64 ] - exclude: - - GOOS: darwin - GOARCH: arm - runs-on: ubuntu-latest - env: - executable: electric-usage-downloader-${{ matrix.GOOS }}-${{ matrix.GOARCH }} - steps: - - - name: Set up Go 1.x - uses: actions/setup-go@v3 - with: - go-version: ^1.15 - id: go - - - name: Check out code into the Go module directory - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Fetch all tags - run: git fetch --force --tags - - name: Get the tag - id: tag_name - run: echo "TAG_NAME=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV - - - name: Get dependencies - run: go get -v -t -d ./... - - - name: Test - run: go test -v . - - - name: Build - run: env GOOS=${{matrix.GOOS}} GOARCH=${{matrix.GOARCH}} go build -v -o ${{env.executable}} . - - - name: Create or update release - id: create_release - uses: ncipollo/release-action@v1 - with: - allowUpdates: true - artifacts: ${{env.executable}} - tag: ${{env.TAG_NAME}} - commit: main - token: ${{ secrets.GITHUB_TOKEN }} - omitBodyDuringUpdate: true + uses: tedpearson/ForecastMetrics/.github/workflows/release-template.yaml@master + with: + executable: electric-usage-downloader \ No newline at end of file