-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
1 parent
1798e2a
commit ca41178
Showing
4 changed files
with
77 additions
and
69 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
12 changes: 9 additions & 3 deletions
12
.github/workflows/lint.yml → .github/workflows/lint-and-tests.yml
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
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 |
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
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 }}) |
This file was deleted.
Oops, something went wrong.