Release of version 2.18.1 (2023-11-15) #11
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: release | |
on: | |
release: | |
types: [released] | |
jobs: | |
merge-rc: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout branch dev | |
uses: actions/checkout@v3 | |
with: | |
ref: dev | |
- uses: actions/setup-node@v3 | |
- name: Get tags versions | |
id: get-tags | |
uses: JinoArch/get-latest-tag@latest | |
- name: Get lts version | |
id: split-lts-tag | |
uses: jungwinter/split@v2 | |
with: | |
msg: '${{ steps.get-tags.outputs.latestTag }}' | |
separator: 'v' | |
- name: Merge branch rc${{ steps.split-lts-tag.outputs._1 }} into main | |
uses: everlytic/[email protected] | |
with: | |
github_token: ${{ secrets.PAT }} | |
source_ref: rc${{ steps.split-lts-tag.outputs._1 }} | |
target_branch: 'main' | |
commit_message_template: 'Merged rc${{ steps.split-lts-tag.outputs._1 }} into main. [skip ci]' | |
compile-prod: | |
needs: merge-rc | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout branch main | |
uses: actions/checkout@v3 | |
with: | |
ref: main | |
- name: Install project dependencies | |
run: npm install | |
- name: Compile Production code | |
run: npm run build | |
- name: Sign and commit compiled code to branch main | |
uses: ./.github/os-git-actions/signed-commit/ | |
with: | |
branch: main | |
message: 'Compiled Production Mode [skip ci]' | |
newFiles: true | |
gpgPriv: ${{ secrets.GPG_SIGN_KEY }} | |
gpgPassPhrase: ${{ secrets.GPG_PASSPHRASE }} | |
update-doc: | |
needs: compile-prod | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout branch main | |
uses: actions/checkout@v3 | |
with: | |
ref: main | |
token: ${{ secrets.PAT }} | |
- uses: actions/setup-node@v3 | |
- name: Install project dependencies | |
run: npm install | |
- name: Install graphviz | |
run: sudo apt install -y graphviz | |
- name: Generate documentation | |
run: npm run docs | |
- name: Sign and commit documentation to branch main | |
uses: ./.github/os-git-actions/signed-commit/ | |
with: | |
branch: main | |
message: 'Update documentation [skip ci]' | |
newFiles: true | |
gpgPriv: ${{ secrets.GPG_SIGN_KEY }} | |
gpgPassPhrase: ${{ secrets.GPG_PASSPHRASE }} | |
deploy-doc: | |
needs: update-doc | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout branch main | |
uses: actions/checkout@v3 | |
with: | |
ref: main | |
- uses: actions/setup-node@v3 | |
- name: Push documentation files into github page | |
uses: GuillaumeFalourd/copy-push-files@v1 | |
with: | |
source_files: docs/* | |
remote_repository: https://github.com/outsystems-ui-docs/outsystems-ui-docs.github.io | |
access_token: ${{ secrets.UICOMPONENTSDOCS }} | |
target_branch: main | |
commit_message: Deploy documentation. | |
publish-npm: | |
needs: update-doc | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout branch main | |
uses: actions/checkout@v3 | |
with: | |
ref: main | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
registry-url: https://registry.npmjs.org/ | |
- name: Publish new version to NPM | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_UICOMPONENTS}} | |
delete-rc: | |
needs: [deploy-doc, publish-npm] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout branch main | |
uses: actions/checkout@v3 | |
with: | |
ref: main | |
- uses: actions/setup-node@v3 | |
- name: Get tags versions | |
id: get-tags | |
uses: JinoArch/get-latest-tag@latest | |
- name: Get latest version | |
id: split-lts-tag | |
uses: jungwinter/split@v2 | |
with: | |
msg: '${{ steps.get-tags.outputs.latestTag }}' | |
separator: 'v' | |
- name: Delete branch rc${{ steps.split-lts-tag.outputs._1 }} | |
shell: bash | |
run: | | |
git push origin -d rc${{ steps.split-lts-tag.outputs._1 }} |