Skip to content

Use separate release file. #21

Use separate release file.

Use separate release file. #21

Workflow file for this run

name: build
on:
push:
branches:
- main
- 'release/**'
pull_request:
branches:
- main
- 'release/**'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GOPATH: ${{ github.workspace }}/provider/cmd
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
# Used for pulumictl to calculate the correct tags :(
- name: Unshallow clone for tags
run: git fetch --prune --unshallow --tags
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.20.x
- name: Install pulumictl
uses: jaxxstorm/action-install-gh-release@c5ead9a448b4660cf1e7866ee22e4dc56538031a # v1.10.0
with:
repo: pulumi/pulumictl
- name: Install Pulumi CLI
uses: pulumi/action-install-pulumi-cli@v2
- name: Install Schema Tools
if: github.event_name == 'pull_request'
uses: jaxxstorm/action-install-gh-release@c5ead9a448b4660cf1e7866ee22e4dc56538031a # v1.10.0
with:
repo: pulumi/schema-tools
- name: Build
run: |
export VERSION=`echo $GITHUB_REF | sed -e "s/refs\/heads\///g" -e "s/release\///g"`
export VERSION="$VERSION.$GITHUB_RUN_NUMBER"
# sed -i "s/0.0.0/${VERSION}/g" src/version.go
make tfgen
make provider
- name: Create Github Release and Tag
if: github.repository_owner == 'Authress' && github.ref != 'refs/heads/main' && github.event_name == 'push'
run: |
git tag v${VERSION -f
git push origin v${VERSION}