docs: update READMEs #9
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
# This workflow will test a golang project, make artifacts, make a | |
# releaes and deploy to GCP FaaS | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go | |
# | |
# This workflow depends on several component workflows: | |
# * component-artifact.yml | |
# * component-lint.yml | |
# * component-test.yml | |
name: test, lint, release | |
on: | |
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onpushbranchestagsbranches-ignoretags-ignore | |
push: | |
# branches: | |
# - main | |
tags: | |
- v* | |
# pull_request: | |
# branches: | |
# - main | |
permissions: | |
contents: write | |
jobs: | |
test: | |
uses: './.github/workflows/component-test.yml' | |
lint: | |
needs: test # requires test to be successful | |
uses: './.github/workflows/component-lint.yml' | |
artifacts: | |
needs: lint # requires lint to be successful | |
uses: './.github/workflows/component-artifact.yml' | |
release: | |
# copy the artifact to a release | |
# for github workflow variables see https://docs.github.com/en/actions/learn-github-actions/contexts#github-context | |
name: release | |
# only run on addition of a tag | |
if: startsWith(github.ref, 'refs/tags/v') | |
needs: artifacts | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 # needed for cache | |
- name: download binaries | |
# https://github.com/actions/download-artifact | |
# You can use the upload-artifact and download-artifact actions to share data between jobs in a workflow | |
uses: actions/download-artifact@v4 | |
with: | |
name: artifacts # remote path | |
path: artifacts # local path | |
- name: show download | |
run: ls -R | |
- name: create release | |
uses: softprops/action-gh-release@v2 | |
# if: startsWith(github.ref, 'refs/tags/') # only if tagged | |
with: | |
# Newline-delimited globs of paths to assets to upload for release | |
files: | | |
artifacts/cli* | |
artifacts/webserver* | |
artifacts/console* | |
# draft: true | |
name: Release for ${{ github.ref_name }} (automated) | |
prerelease: false | |
body_path: CHANGELOG.txt | |
fail_on_unmatched_files: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |