Weekly publish of pre-release #470
Workflow file for this run
This file contains hidden or 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: Build | |
| on: | |
| push: | |
| branches: [ localstack ] | |
| tags: v*.* | |
| pull_request: | |
| branches: [ localstack ] | |
| # Callable by weekly-release.yml; publishes a release when `version` is set. | |
| workflow_call: | |
| inputs: | |
| version: | |
| description: "Release version to tag and publish (e.g. v0.2.1). When set, a release is published." | |
| type: string | |
| required: false | |
| default: "" | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| - name: Run tests | |
| run: make tests-with-docker | |
| build: | |
| runs-on: ubuntu-latest | |
| needs: test | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| - name: Build | |
| env: | |
| RELEASE_BUILD_LINKER_FLAGS: "-s -w" | |
| run: make compile-lambda-linux-all | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: aws-lambda-rie | |
| path: bin/* | |
| - name: Push tag | |
| if: inputs.version != '' | |
| run: | | |
| git tag "${{ inputs.version }}" "$GITHUB_SHA" | |
| git push origin "${{ inputs.version }}" | |
| - name: Release binaries | |
| uses: softprops/action-gh-release@v3 | |
| if: startsWith(github.ref, 'refs/tags/') || inputs.version != '' | |
| with: | |
| tag_name: ${{ inputs.version || github.ref_name }} | |
| files: bin/* | |
| generate_release_notes: true | |
| prerelease: ${{ endsWith(github.ref, '-pre') || endsWith(inputs.version, '-pre') }} |