Skip to content

Commit

Permalink
Feature/remove increase version pipeline (#115) (#116)
Browse files Browse the repository at this point in the history
* Feature/remove increase version pipeline (#115)

* Add tag based releases

* Add tests steps

* trigger lint and tests on merge

* npm command

* Fix tests command

* add --passWithNoTests to tests in pipeline

* Remove test execution - we dont have tests here
  • Loading branch information
dlawrynowicz authored Aug 18, 2023
1 parent 1798e2a commit ca41178
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 69 deletions.
41 changes: 0 additions & 41 deletions .github/workflows/increment-version.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
name: Lint
name: Lint and tests

on:
push:
branches:
- master
- multitenant
pull_request:
branches:
- master
- multitenant

jobs:
lint:
lintAndTests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.x'
- run: npm install
- run: npm run lint

- name: Run linter
run: npm run lint
68 changes: 68 additions & 0 deletions .github/workflows/release-npm-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Build & Publish Testerloop CLI NPM Package

on:
workflow_dispatch:
push:
tags:
- '*'

env:
NEW_VERSION: ${{ github.ref_name }}
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npm ci

- name: Run linter
run: npm run lint

publish-npm:
needs: tests
runs-on: ubuntu-latest
permissions:
packages: write
contents: write
steps:
- uses: actions/checkout@v3

- name: Build Changelog
id: github_release
uses: mikepenz/release-changelog-builder-action@v3
env:
GITHUB_TOKEN: ${{ secrets.TESTERLOOP_ACCESS_TOKEN }}

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.TESTERLOOP_ACCESS_TOKEN }}
with:
tag_name: ${{ env.NEW_VERSION }}
release_name: ${{ env.NEW_VERSION }}
body: ${{ steps.github_release.outputs.changelog }}

- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://npm.pkg.github.com/
- run: npm ci
- run: npm run build
- name: Login to GitHub Package Registry
run: echo "//npm.pkg.github.com/:_authToken=${{secrets.secrets.NPM_TOKEN}}" >> ~/.npmrc
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Send Slack notification
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_MESSAGE: |
Build & Publish Testerloop CLI Package workflow completed.
Latest Release: *[ ${{ env.NEW_VERSION }} ]* (https://github.com/${{ github.repository }}/releases/${{ env.NEW_VERSION }})
25 changes: 0 additions & 25 deletions .github/workflows/release-package.yml

This file was deleted.

0 comments on commit ca41178

Please sign in to comment.