This repository has been archived by the owner on Nov 27, 2023. It is now read-only.
fix: fix release flow (#336) #149
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: publish-package | |
on: | |
push: | |
branches: [ master ] | |
workflow_dispatch: | |
env: | |
USE_SELENOID: true | |
jobs: | |
master_tests: | |
name: Run e2e tests | |
runs-on: ubuntu-latest | |
if: "!contains(github.event.head_commit.message, 'chore(release)')" | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.WDIO_TOKEN }} | |
- name: Use Node.js v16 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8.6.10 | |
- name: Execute e2e with Selenoid | |
uses: ./.github/actions/e2e | |
# - uses: sonots/slack-notice-action@v3 | |
# with: | |
# status: ${{ job.status }} | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.WDIO_TOKEN }} | |
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_BOT_NOTIFICATION }} | |
# if: failure() | |
release_package: | |
needs: master_tests | |
name: Release package | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.WDIO_TOKEN }} | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8.6.10 | |
- name: Install packages | |
run: pnpm install | |
- name: run standard version | |
run: | | |
git config user.name ${{ secrets.USERNAME }} | |
git config user.email "${{ secrets.MAIL }}" | |
pnpm release | |
- name: push changes | |
run: git push --follow-tags origin master | |
- uses: JS-DevTools/npm-publish@v1 | |
with: | |
token: ${{ secrets.NPM_TOKEN }} | |
# - uses: sonots/slack-notice-action@v3 | |
# with: | |
# status: ${{ job.status }} | |
# text_on_success: 'New version wdio-allure-ts published successfully' | |
# text_on_fail: 'Publish failed, please check' | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.WDIO_TOKEN }} | |
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_BOT_NOTIFICATION }} | |
# if: always() |