Release 3.1.1 by @thom4parisot #7
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: Release | |
run-name: Release ${{ inputs.version }} by @${{ github.actor }} | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: Version | |
required: true | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- run: | | |
node -e "const pkg = require('./package.json'); pkg.version = '$RELEASE_VERSION'; require('fs').writeFileSync('./package.json', JSON.stringify(pkg, null, ' '), 'utf8')" | |
node -e "const pkg = require('./front/package.json'); pkg.version = '$RELEASE_VERSION'; require('fs').writeFileSync('./front/package.json', JSON.stringify(pkg, null, ' '), 'utf8')" | |
node -e "const pkg = require('./graphql/package.json'); pkg.version = '$RELEASE_VERSION'; require('fs').writeFileSync('./graphql/package.json', JSON.stringify(pkg, null, ' '), 'utf8')" | |
npm i --package-lock-only | |
npm i --prefix=graphql --package-lock-only | |
npm i --prefix=front --package-lock-only | |
RELEASE_GIT_NAME=$(curl -s https://api.github.com/users/$GITHUB_ACTOR | jq -r .name) | |
[email protected] | |
git config --local user.name "$RELEASE_GIT_NAME" | |
git config --local user.email "$RELEASE_GIT_EMAIL" | |
git commit -a -m "Release $RELEASE_VERSION" | |
git tag "v$RELEASE_VERSION" | |
git push origin master | |
git push origin "v$RELEASE_VERSION" | |
env: | |
RELEASE_VERSION: ${{ inputs.version }} | |
call-build-deploy-docker: | |
uses: EcrituresNumeriques/stylo/.github/workflows/docker.yml@master | |
with: | |
release-version: ${{ inputs.version }} | |
secrets: inherit | |
needs: [release] |