Fix: terragunt should call 'providers schema -json' (#205) #139
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
name: release | |
on: | |
push: | |
tags: | |
- "v[0-9]+.*" | |
jobs: | |
goreleaser: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.23 | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v5 | |
with: | |
version: ~> v1 | |
args: release --clean | |
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@v4 | |
- name: Set up Go 1.23 | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.23 | |
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@v4 | |
with: | |
node-version: 20 | |
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 }} |