Merge pull request #89 from nevermined-io/fix/optional_query_opts #37
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
name: GitHub Release | |
on: | |
push: | |
tags: | |
- 'v*.*.*' | |
jobs: | |
release: | |
name: 'Tagged Release' | |
runs-on: 'ubuntu-latest' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.API_TOKEN_GITHUB }} | |
# Build process | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Set version to env | |
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
- name: Build package | |
run: | | |
yarn | |
npm pack | |
- name: Update Docs | |
run: | | |
yarn run doc | |
- name: Update CHANGELOG.md | |
id: changelog | |
run: | | |
yarn add --dev auto-changelog | |
npx auto-changelog | |
- name: Detect branch to commit changelog | |
id: branch-changelog | |
run: | | |
tagged_branches=$(git --no-pager branch -a --contains tags/${{ env.RELEASE_VERSION }} --no-column) | |
echo "$tagged_branches" | |
if echo "$tagged_branches" | grep -E '^[[:space:]]*main$' > /dev/null; then | |
commit_branch=main | |
elif echo "$tagged_branches" | grep -E '^[[:space:]]*main$' > /dev/null; then | |
commit_branch=main | |
elif echo "$tagged_branches" | grep -E '^[[:space:]]*develop$' > /dev/null; then | |
commit_branch=develop | |
else | |
commit_branch=$(echo "$tagged_branches" | tail -n1) | |
commit_branch=${commit_branch//[[:blank:]]/} | |
fi | |
commit_branch="${commit_branch//remotes\/origin\//}" | |
echo "COMMIT_BRANCH=${commit_branch}" >> $GITHUB_ENV | |
- name: Commit Documentation | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: Automated docs update | |
commit_options: '--no-verify --signoff' | |
file_pattern: docs/* | |
disable_globbing: true | |
branch: ${{ env.COMMIT_BRANCH }} | |
- name: Commit CHANGELOG.md | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: Automated CHANGELOG.md update | |
commit_options: '--no-verify --signoff' | |
file_pattern: CHANGELOG.md | |
branch: ${{ env.COMMIT_BRANCH }} | |
- name: Publish Github relase | |
uses: 'marvinpinto/action-automatic-releases@latest' | |
with: | |
repo_token: '${{ secrets.GITHUB_TOKEN }}' | |
prerelease: false | |
files: | | |
CHANGELOG.md | |
nevermined-io-payments-${{ env.RELEASE_VERSION }}.tgz |