Skip to content

chore(deps): bump next from 13.0.3 to 13.5.1 in /packages/landingpage #257

chore(deps): bump next from 13.0.3 to 13.5.1 in /packages/landingpage

chore(deps): bump next from 13.0.3 to 13.5.1 in /packages/landingpage #257

Workflow file for this run

name: 'Publish Release & Deploy'
## Workflow to deploy a new version to version/<TAG_NAME> github pages.
## The version is available at elements.inovex.de/version/<TAG-NAME>
on:
pull_request:
types:
- closed
branches:
- master
jobs:
build:
if: ${{ (github.event.pull_request.merged == true) && (contains(github.event.pull_request.labels.*.name, 'release')) }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/workflows/dependencies-install
- run: npm config set scripts-prepend-node-path true
- run: yarn build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload all build artifacts
uses: ./.github/workflows/artifacts-upload
with:
upload-core-artifacts: true
upload-storybook-artifact: true
publish:
needs: build
runs-on: ubuntu-latest
outputs:
newTag: ${{ steps.tag_version.outputs.new_tag }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
registry-url: https://registry.npmjs.org
scope: '@inovex.de' # important for yarn
always-auth: true
- name: Create version tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- uses: ./.github/workflows/artifacts-download
with:
download-core-artifacts: true
check-artifacts: true # search in current workflow run
workflow-conclusion: "in_progress" # need to change to in_progress, cause current workflow run is always running
- name: Prepare git config
run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor}}@users.noreply.github.com"
- name: Publish @inovex.de/elements to NPM
run: npm publish
working-directory: packages/elements
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish @inovex.de/elements-angular to NPM
run: npm publish
working-directory: packages/elements-angular
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish @inovex.de/elements-react to NPM
run: npm publish
working-directory: packages/elements-react
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish @inovex.de/elements-vue to NPM
run: npm publish
working-directory: packages/elements-vue
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: Release ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}
deploy:
needs: publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
name: Checkout pages branch
with:
ref: pages
- name: Download Storybook artifact
uses: dawidd6/action-download-artifact@v2
with:
name: storybook
path: version/${{ needs.publish.outputs.newTag }} # Push to the proper directory on gh pages branch.
check-artifacts: true # search in current workflow run
workflow-conclusion: "in_progress" # need to change to in_progress, cause current workflow run is always running
- name: Provide latest symlink
run: cd version && rm -f latest && ln -s ${{ needs.publish.outputs.newTag }} latest
shell: bash
# Crawls the version dir on current pages branch HEAD.
# Jq extracts the directory name of the versions and transfers it to an array of the form ["0.1.1", "0.2.1"].
- name: Update Hosted Versions
run: find ./version/* -type d -maxdepth 0 | cut -c 11- | jq -R -s -c 'split("\n")[:-1]' > ./hosted-versions.json
- name: Deploy to Github Pages 🚀
uses: JamesIves/[email protected]
with:
branch: pages
commit-message: Deploying version ${{ needs.publish.outputs.newTag }} 🚀
folder: '.'
clean: false # Important to keep other versions.