Release of version 2.18.1 (2023-11-15) #19
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: pre-release | |
on: | |
release: | |
types: [prereleased] | |
jobs: | |
run-lint-and-prettier: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout branch dev | |
uses: actions/checkout@v3 | |
with: | |
ref: dev | |
- uses: actions/setup-node@v3 | |
- name: Install project dependencies | |
run: npm install | |
- name: Run lintfix and prettier | |
run: | | |
npm run lintfix | |
npm run prettier | |
get-tags-versions: | |
needs: run-lint-and-prettier | |
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 latest version ${{ steps.get-tags.outputs.latestTag }} | |
id: split-lts-tag | |
uses: jungwinter/split@v2 | |
with: | |
msg: '${{ steps.get-tags.outputs.latestTag }}' | |
separator: 'v' | |
- name: Create version artifact | |
shell: bash | |
run: | | |
expr ${{ steps.split-lts-tag.outputs._1 }} > new-version-artf.txt | |
- name: Store new tag version | |
uses: actions/upload-artifact@v3 | |
with: | |
name: new-version-tag | |
path: new-version-artf.txt | |
retention-days: 1 | |
update-version: | |
needs: get-tags-versions | |
runs-on: ubuntu-latest | |
steps: | |
# - name: Configure Git with the GitHub Token | |
# run: | | |
# git config --global user.email "[email protected]" | |
# git config --global user.name "UiComponentsBot" | |
# git config --global credential.helper store | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.PAT }} | |
# The code above | |
- name: Checkout branch dev | |
uses: actions/checkout@v3 | |
with: | |
ref: dev | |
token: ${{ secrets.PAT }} | |
- uses: actions/setup-node@v3 | |
- name: Install project dependencies | |
run: npm install | |
- name: Get new version artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: new-version-tag | |
- name: Get version var | |
id: get-artifact-version | |
shell: bash | |
run: | | |
value=`cat new-version-artf.txt` | |
echo "version="$value >> $GITHUB_OUTPUT | |
- name: Update version from v${{ steps.get-artifact-version.outputs.version }} | |
run: npm run gta-update-version ${{ steps.get-artifact-version.outputs.version }} | |
- name: Sign and Commit version increment to branch dev | |
uses: ./.github/os-git-actions/signed-commit/ | |
with: | |
branch: dev | |
message: 'Updated version. [skip ci]' | |
newFiles: true | |
gpgPriv: ${{ secrets.GPG_SIGN_KEY }} | |
gpgPassPhrase: ${{ secrets.GPG_PASSPHRASE }} | |
create-rc: | |
needs: get-tags-versions | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout branch dev | |
uses: actions/checkout@v3 | |
with: | |
ref: dev | |
- uses: actions/setup-node@v3 | |
- name: Get new version artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: new-version-tag | |
- name: Get version var | |
id: get-artifact-version | |
shell: bash | |
run: | | |
value=`cat new-version-artf.txt` | |
echo "version="$value >> $GITHUB_OUTPUT | |
- name: Create branch rc${{ steps.get-artifact-version.outputs.version }} | |
shell: bash | |
run: | | |
git checkout -b rc${{ steps.get-artifact-version.outputs.version }} | |
git push -u origin rc${{ steps.get-artifact-version.outputs.version }} | |
compile-rc: | |
needs: create-rc | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-node@v3 | |
- name: Get new version artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: new-version-tag | |
- name: Get version var | |
id: get-artifact-version | |
shell: bash | |
run: | | |
value=`cat new-version-artf.txt` | |
echo "version="$value >> $GITHUB_OUTPUT | |
- name: Checkout branch rc${{ steps.get-artifact-version.outputs.version }} | |
uses: actions/checkout@v3 | |
with: | |
ref: rc${{ steps.get-artifact-version.outputs.version }} | |
- name: Install project dependencies | |
run: npm install | |
- name: Compile Production code | |
run: npm run build | |
- name: Sign and commit compiled code to branch rc${{ steps.get-artifact-version.outputs.version }} | |
uses: ./.github/os-git-actions/signed-commit/ | |
with: | |
branch: 'rc${{ steps.get-artifact-version.outputs.version }}' | |
message: 'Compiled Production Mode [skip ci]' | |
newFiles: true | |
gpgPriv: ${{ secrets.GPG_SIGN_KEY }} | |
gpgPassPhrase: ${{ secrets.GPG_PASSPHRASE }} | |
delete-artifact: | |
needs: [update-version, create-rc, compile-rc] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout branch dev | |
uses: actions/checkout@v3 | |
with: | |
ref: dev | |
- uses: actions/setup-node@v3 | |
- name: Remove new version artifact | |
uses: geekyeggo/delete-artifact@v2 | |
with: | |
name: new-version-tag |