Release version 1.10.7 pull request #64
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
on: | |
workflow_dispatch: | |
# on merge on main branch | |
pull_request: | |
types: | |
- closed | |
branches: | |
- master | |
jobs: | |
build_and_publish: | |
# run this job only if the PR was containing the specific release label | |
if: contains( github.event.pull_request.labels.*.name, 'release') || github.event_name == 'workflow_dispatch' | |
environment: prod-cd | |
runs-on: ubuntu-latest | |
permissions: | |
# contents write permissions required for release | |
contents: write | |
packages: write | |
steps: | |
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 | |
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | |
with: | |
registry-url: 'https://registry.npmjs.org' | |
node-version-file: ".node-version" | |
# Defaults to the user or organization that owns the workflow file | |
scope: '@pagopa' | |
- run: yarn install --frozen-lockfile | |
- run: yarn build | |
- id: get_version | |
name: Get Version | |
run: | | |
PACKAGE_FILE="package.json" | |
if [[ -f "$PACKAGE_FILE" ]]; then | |
echo "new_version=$(jq -r .version package.json)" >> $GITHUB_ENV | |
else | |
echo "::error title=Pipeline error::Pipeline could not find package.json file" | |
exit 1 | |
fi | |
shell: bash | |
- name: Create Release tag | |
uses: ncipollo/release-action@2c591bcc8ecdcd2db72b97d6147f871fcd833ba5 # v1.14.0 | |
with: | |
commit: ${{ github.ref_name }} | |
tag: ${{ env.new_version }} | |
name: Release ${{ env.new_version }} | |
makeLatest: latest | |
generateReleaseNotes: true | |
prerelease: false |