Skip to content

Use a different GH release action which works with any tag #9

Use a different GH release action which works with any tag

Use a different GH release action which works with any tag #9

Workflow file for this run

name: "release"
on:
push:
tags:
- "*"
jobs:
release:
name: "Release"
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- name: set env
run: echo "NOW=$(date +'%Y.%m.%d')" >> $GITHUB_ENV
- name: Set Node.js 21.x
uses: actions/setup-node@v3
with:
node-version: 21.x
- name: Install Node.js dependencies
run: yarn install
- name: Generate provider code
run: node generators/rootly/rootly.js
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: "1.21"
- name: Build for linux/amd64
run: go build -o terraformer-rootly-linux-amd64
- name: Build for linux/arm64
run: GOOS=linux GOARCH=arm64 go build -o terraformer-rootly-linux-arm64
- name: Build for mac
run: GOOS=darwin go build -o terraformer-rootly-darwin-amd64
- name: Build for mac Apple Silicon
run: GOOS=darwin GOARCH=arm64 go build -o terraformer-rootly-darwin-arm64
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
terraformer-rootly-linux-amd64
terraformer-rootly-linux-arm64
terraformer-rootly-darwin-amd64
terraformer-rootly-darwin-arm64