This repository has been archived by the owner on Mar 21, 2024. It is now read-only.
Bump to actions/checkout@v4 #30
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
--- | |
name: Test and Release | |
on: # yamllint disable-line rule:truthy | |
push: | |
branches: | |
- '**' | |
jobs: | |
yamllint: | |
runs-on: ubuntu-latest | |
steps: | |
- id: checkout | |
name: Checkout code π | |
uses: actions/checkout@v3 | |
- id: yamllint | |
name: Run yamllint π | |
uses: ibiqlik/action-yamllint@v3 | |
with: | |
strict: true | |
update-doc: | |
runs-on: ubuntu-latest | |
steps: | |
- id: checkout | |
name: Checkout code π | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo | |
- id: auto-doc | |
name: Run auto-doc π | |
uses: tj-actions/[email protected] | |
- id: changes | |
name: Verify changed files π | |
uses: tj-actions/[email protected] | |
with: | |
files: | | |
README.md | |
- id: commit | |
if: steps.changes.outputs.files_changed == 'true' | |
name: Commit README changes π₯ | |
uses: EndBug/add-and-commit@v9 | |
with: | |
message: 'Update README' | |
committer_name: 'GitHub Actions' | |
committer_email: '[email protected]' | |
add: 'README.md' | |
release: | |
needs: | |
- yamllint | |
runs-on: ubuntu-latest | |
steps: | |
- id: checkout | |
name: Checkout code π | |
uses: actions/checkout@v3 | |
- name: Get next version | |
uses: reecetech/[email protected] | |
id: version | |
with: | |
scheme: semver | |
increment: minor | |
- id: release | |
if: ${{ github.ref_name == github.event.repository.default_branch }} | |
name: Release version π¦ | |
uses: marvinpinto/[email protected] | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
draft: false | |
prerelease: false | |
automatic_release_tag: "${{ steps.version.outputs.version }}" | |
- id: push-short-tag | |
name: Create release short tag π· | |
uses: richardsimko/update-tag@5bd0e05b035e02d5da3768dbdcfc4e5e0908623e | |
with: | |
tag_name: ${{ steps.version.outputs.major-v-version }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- id: output-version | |
name: Version noted summary page π | |
shell: bash | |
run: | | |
set -euo pipefail | |
echo -e "## β¨ Published\n" | \ | |
tee -a "${GITHUB_STEP_SUMMARY}" | |
echo -e "Name: ${{ github.event.repository.name }}\n" | \ | |
tee -a "${GITHUB_STEP_SUMMARY}" | |
echo -e "Version: ${{ steps.version.outputs.v-version }}\n" | \ | |
tee -a "${GITHUB_STEP_SUMMARY}" | |
echo -e "Moved tag: ${{ steps.version.outputs.major-v-version }}\n" \ | |
| tee -a "${GITHUB_STEP_SUMMARY}" |