Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Commit

Permalink
Apps 9798 add publish job (#238)
Browse files Browse the repository at this point in the history
* feat: add publish-package script
  • Loading branch information
AlexeyCL authored Jul 20, 2021
1 parent 6661dd6 commit 899c347
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 13 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/ci-pr-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ name: ci-pr-merge
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [master]
pull_request:
branches: [master]

Expand Down
51 changes: 41 additions & 10 deletions .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
name: publish-package

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
master_tests:
name: Run e2e tests
# This workflow contains a single job called "build"
# The type of runner that the job will run on

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
with:
token: ${{ secrets.WDIO_TOKEN }}
- name: Use Node.js v12.x
uses: actions/setup-node@v1
with:
Expand All @@ -33,12 +29,47 @@ jobs:
- name: Run tests
run: yarn test

- 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:
- name: Release new package
run: standard-version --dry-run
- uses: actions/checkout@v2
with:
token: ${{ secrets.WDIO_TOKEN }}

- name: Install packages
run: yarn install

- name: run standart version
run: |
git config user.name ${{ secrets.USERNAME }}
git config user.email "${{ secrets.MAIL }}"
yarn 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()
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.


### [3.0.1](https://github.com/cloudinary/wdio-allure-ts/compare/v3.0.0...v3.0.1) (2021-07-01)


Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wdio-allure-ts",
"version": "3.0.1",
"version": "3.0.18",
"description": "UI E2E testing util",
"license": "MIT",
"author": "Cloudinary <[email protected]>",
Expand Down

0 comments on commit 899c347

Please sign in to comment.