Skip to content

Commit

Permalink
updated workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Mateusz Duda committed Apr 11, 2024
1 parent 8f016f3 commit 82e6805
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/publish-package-to-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ on:
- 'main'
jobs:
test:
name: Build & Test
name: Publish package to npm
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x, 14.x]
node-version: [12.16.1]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Cache node_modules
Expand All @@ -33,9 +33,9 @@ jobs:
name: Publish
needs: test
runs-on: ubuntu-latest
if: github.event_name == 'push' && ( github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' )
if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' )
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Cache node_modules
id: cache-modules
uses: actions/cache@v1
Expand All @@ -51,5 +51,7 @@ jobs:
- name: Publish
uses: mikeal/merge-release@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
DEPLOY_DIR: my/deploy/dir
SRC_PACKAGE_DIR: my/src/package
2 changes: 1 addition & 1 deletion .github/workflows/run-unit-tests.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
on: [push]
name: Tests
on: [push]
run-name: ${{ github.event.head_commit.message }}
jobs:
run-tests:
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ For unit testing there is a [separate mock repository](https://www.npmjs.com/pac
- [ ] Unit tests for common actions:
- [ ] Testing if files are correstly updated in database depending on changes in git
- [ ] On loading `tags.json` assert that all parents exist in database, if not then these modules won't be displayed
- [ ] Add [np package](https://www.npmjs.com/package/np) to handle publishing to npm - giga optional
- [ ] Add [automatic publish to npm](https://github.com/marketplace/actions/automated-releases-for-npm-packages) as github action (if tests passed)

### To be discussed
Expand Down

0 comments on commit 82e6805

Please sign in to comment.