ci: update release config

This commit is contained in:
Geoffroy Empain 2020-12-16 12:11:16 +01:00
parent 3ea2f6c0f8
commit 0c3e85cbe1

View File

@ -3,6 +3,8 @@ on: [ push ]
env: env:
GITHUB_REPOSITORY_SSH_URL: "git@github.com:${{ github.repository }}.git" GITHUB_REPOSITORY_SSH_URL: "git@github.com:${{ github.repository }}.git"
IS_RELEASE_BRANCH: "${{ github.ref == 'refs/heads/latest' || github.ref == 'refs/heads/next' || github.ref == 'refs/heads/beta' }}" IS_RELEASE_BRANCH: "${{ github.ref == 'refs/heads/latest' || github.ref == 'refs/heads/next' || github.ref == 'refs/heads/beta' }}"
GIT_AUTHOR_NAME: "meli-release-bot"
GIT_COMMITTER_NAME: "meli-release-bot"
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -22,7 +24,7 @@ jobs:
echo "Next release version is $(cat VERSION)" echo "Next release version is $(cat VERSION)"
env: env:
RELEASE_DEPLOY_KEY: ${{ secrets.RELEASE_DEPLOY_KEY }} RELEASE_DEPLOY_KEY: ${{ secrets.RELEASE_DEPLOY_KEY }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: "Lint" - name: "Lint"
run: npm run lint run: npm run lint
@ -43,7 +45,7 @@ jobs:
npx semantic-release -r $GITHUB_REPOSITORY_SSH_URL npx semantic-release -r $GITHUB_REPOSITORY_SSH_URL
env: env:
RELEASE_DEPLOY_KEY: ${{ secrets.RELEASE_DEPLOY_KEY }} RELEASE_DEPLOY_KEY: ${{ secrets.RELEASE_DEPLOY_KEY }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: "realign next" - name: "realign next"
if: ${{ env.IS_RELEASE_BRANCH == 'true' }} if: ${{ env.IS_RELEASE_BRANCH == 'true' }}