Skip to content

new-release

new-release #10

Workflow file for this run

name: new-release
on:
workflow_dispatch:
inputs:
new-version:
description: 'Version to be released.'
type: string
required: true
jobs:
run-lint-on-rc:
runs-on: ubuntu-latest
if: ${{ github.event.inputs.new-version }}
steps:
- uses: actions/checkout@v3
with:
ref: rc${{ github.event.inputs.new-version }}
- name: Install project dependencies
run: npm install
- name: Run build
run: npm run build
merge-rc-into-main:
needs: run-lint-on-rc
runs-on: ubuntu-latest
if: ${{ github.event.inputs.new-version }}
steps:
- uses: actions/checkout@v3
with:
ref: rc${{ github.event.inputs.new-version }}
- name: Merge branch rc${{ github.event.inputs.new-version }} into main
uses: everlytic/branch-merge@1.1.5
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# github_token: ${{ secrets.PAT }} TODO!
source_ref: rc${{ github.event.inputs.new-version }}
target_branch: 'main'
commit_message_template: 'Merged rc${{ github.event.inputs.new-version }} into main. [skip ci]'
create-prep-to-deploy:
needs: run-lint-on-rc
runs-on: ubuntu-latest
if: ${{ github.event.inputs.new-version }}
steps:
- uses: actions/checkout@v3
with:
ref: rc${{ github.event.inputs.new-version }}
- name: Create branch prep-to-deploy
run: |
git checkout -b prep-to-deploy
git push -u origin prep-to-deploy
create-doc:
needs: create-prep-to-deploy
runs-on: ubuntu-latest
if: ${{ github.event.inputs.new-version }}
steps:
- uses: actions/checkout@v3
with:
ref: prep-to-deploy
# TODO
- name: Configure Git with the GitHub Token
run: |
git config --global user.email "sa_git_uicomponents@outsystems.com"
git config --global user.name "UiComponentsBot"
git config --global credential.helper store
- name: Install project dependencies
run: npm install
- name: Install graphviz
run: sudo apt install -y graphviz
- name: Generate documentation
run: npm run docs
- name: Perform git commit
uses: ./.github/os-git-actions/manual-commit/
with:
branch: prep-to-deploy
message: 'Update documentation [skip ci]'
newFiles: true
deploy-doc:
needs: create-doc
runs-on: ubuntu-latest
if: ${{ github.event.inputs.new-version }}
steps:
- uses: actions/checkout@v3
with:
ref: prep-to-deploy
- name: Push docs
run: |
echo "deploy docs! >>>>"
# - 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.
clean-to-deploy:
needs: deploy-doc
runs-on: ubuntu-latest
if: ${{ github.event.inputs.new-version }}
steps:
- name: Checkout branch main
uses: actions/checkout@v3
with:
ref: prep-to-deploy
- name: Install project dependencies
run: npm install
- name: Remove dist folder from .gitignore
run: |
gulp removeDistFromGitIgnore
- name: Compile into production mode
run: |
npm run build
- name: Clean files and folders
run: |
gulp prepareToDeploy
- name: Commit changes
run: |
git add .
git commit -m 'prepare to deploy [skip ci]'
git push origin prepareToDeploy