Skip to content

Fix: Terragrunt Run-All fails to Tag Azure Resource Group (#189) #129

Fix: Terragrunt Run-All fails to Tag Azure Resource Group (#189)

Fix: Terragrunt Run-All fails to Tag Azure Resource Group (#189) #129

Workflow file for this run

name: release
on:
push:
tags:
- "v[0-9]+.*"
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.21
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
version: latest
args: release --rm-dist
env:
CGO_ENABLED: 0
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
npmbuild:
name: Build for Alpine and publish node artifact
runs-on: ubuntu-latest
needs: goreleaser
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Set up Go 1.21
uses: actions/setup-go@v4
with:
go-version: 1.21
id: go
- name: Get dependencies
run: |
go get -v -t -d ./...
- name: Build project
run: |
mkdir out
CGO_ENABLED=0 go build -ldflags "-X main.version=${{github.ref_name}}" -a -installsuffix cgo -o ./out/terratag/terratag ./cmd/terratag
# Setup .npmrc file to publish to GitHub Packages
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "12.x"
registry-url: "https://registry.npmjs.org"
scope: "@env0"
- run: |
npm init --yes --scope @env0
ref=${{ github.ref }}
tag=\"${ref#"refs/tags/v"}\"
echo "`jq .version="${tag}" package.json`" > package.json
working-directory: ./out/terratag
- run: npm publish --access public ./out/terratag
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}