dss/.github/workflows/release_stable.yml

74 строки
1.8 KiB
YAML

name: Release stable channel
defaults:
run:
shell: bash
on: [workflow_dispatch]
jobs:
release-stable:
runs-on: ubuntu-latest
permissions:
id-token: write # Required by Akeyless
contents: read
packages: read
steps:
- name: Import Secrets
id: import-secrets
uses: LanceMcCarthy/akeyless-action@v3
with:
access-id: ${{ secrets.GH_AKEYLESS_ACCESS_ID }}
static-secrets: |
{
"/WebComponents/prod/tokens/GH_TOKEN": "GH_TOKEN",
"/WebComponents/prod/tokens/PROGRESS_NPM_REGISTRY_TOKEN": "NPM_TOKEN"
}
export-secrets-to-environment: false
- name: Checkout branch
uses: actions/checkout@v2
with:
ref: master
token: ${{ steps.import-secrets.outputs.GH_TOKEN }}
- name: Setup git
run: |
git config user.name "kendo-bot"
git config user.email "kendouiteam@progress.com"
- name: Merge develop to master
run: |
git fetch --quiet
git reset --hard origin/master
git merge --ff-only --quiet origin/develop
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Setup node cache
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- name: Install
run: npm ci
- name: Publish
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ steps.import-secrets.outputs.GH_TOKEN }}
NPM_TOKEN: ${{ steps.import-secrets.outputs.NPM_TOKEN }}
- name: Update develop
run: |
git push origin master:develop --quiet > /dev/null 2>&1
env:
GITHUB_TOKEN: ${{ steps.import-secrets.outputs.GH_TOKEN }}