Skip to content

Commit

Permalink
Actions: Add release-package
Browse files Browse the repository at this point in the history
  • Loading branch information
Joakim committed Apr 5, 2023
1 parent 31a4f3a commit 73cbb05
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .github/Dockerfile
@@ -1,4 +1,4 @@
FROM mongo:latest
FROM mongo:5.0.15

VOLUME /data
EXPOSE 27001 27002 27003
Expand Down
41 changes: 11 additions & 30 deletions .github/workflows/main.yml
@@ -1,39 +1,20 @@
name: main
on: [push, pull_request]
on:
push:
branches:
- 'dev'
- 'master'
pull_request:
branches:
- 'dev'
- 'master'
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [^12, ^14]
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup MongoDB
run: bash ./.github/mongo_setup.sh

- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Install Dependency
run: npm install --ignore-engines

# - name: Build library
# run: npm run build

- name: Run unit tests
run: npm run test

coverall:
needs: [test]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [ ^12, ^14 ]
node-version: [ ^16, ^18 ]
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -60,7 +41,7 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}

release:
needs: [test,coverall]
needs: [coverall]
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/release-package.yml
@@ -0,0 +1,21 @@
name: release-package
on:
release:
types: [created]

jobs:
publish-gpr:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 18
registry-url: https://npm.pkg.github.com/
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "resourcejs",
"version": "2.4.0",
"name": "@sefriol/resourcejs",
"version": "3.0.0-edge",
"description": "A simple Express library to reflect Mongoose models to a REST interface.",
"main": "Resource.js",
"scripts": {
Expand All @@ -12,7 +12,7 @@
},
"repository": {
"type": "git",
"url": "https://github.com/travist/resourcejs"
"url": "https://github.com/sefriol/resourcejs"
},
"keywords": [
"Express",
Expand Down

0 comments on commit 73cbb05

Please sign in to comment.