From a2260aa221c8418e14b543c54a26e2f3976f410c Mon Sep 17 00:00:00 2001 From: michimani Date: Mon, 5 Dec 2022 21:56:17 +0900 Subject: [PATCH] fix: use go 1.19 to build extension #6 --- .github/workflows/onlytest.yml | 5 +++++ .github/workflows/release.yml | 28 ++++++++++------------------ 2 files changed, 15 insertions(+), 18 deletions(-) diff --git a/.github/workflows/onlytest.yml b/.github/workflows/onlytest.yml index 7bda6e9..fb2a703 100644 --- a/.github/workflows/onlytest.yml +++ b/.github/workflows/onlytest.yml @@ -36,6 +36,11 @@ jobs: name: Build test runs-on: ubuntu-latest steps: + - name: Set up Go 1.19 + uses: actions/setup-go@v3 + with: + go-version: 1.19 + - name: Check out code uses: actions/checkout@v3 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 819a862..e39f180 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,27 +23,16 @@ jobs: - name: Test code run: go test github.com/michimani/aws-lambda-api-go/... -shuffle=on - setup-release: - name: Setup release + create-release: + name: Build extension needs: test runs-on: ubuntu-latest steps: - - name: Create release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Set up Go 1.19 + uses: actions/setup-go@v3 with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} - draft: false - prerelease: false + go-version: 1.19 - create-release: - name: Create new release - needs: setup-release - runs-on: ubuntu-latest - steps: - name: Check out code into the Go module directory uses: actions/checkout@v3 @@ -52,10 +41,13 @@ jobs: make build cd bin && zip -r extension.zip extensions/ - - name: Upload release asset + - name: Create new release with asset uses: softprops/action-gh-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: false files: bin/extension.zip - name: extension.zip