Skip to content

Commit

Permalink
fix create release
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grevin committed Jan 14, 2021
1 parent 4fafd7e commit 6b9201c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/create_npm_package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Create npm package

on:
release:
types: [created]
types: [published]

jobs:
create_package:
Expand All @@ -11,9 +11,6 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- name: Set env
run: echo ::set-env name=RELEASE_VERSION::${GITHUB_REF#refs/*/}

- name: Set up node
uses: actions/setup-node@v1
with:
Expand All @@ -31,7 +28,7 @@ jobs:
run: npx typescript ./dist/index.js --declaration --allowJs --emitDeclarationOnly --outDir ./dist

- name: Set package version
run: sed -i 's/RELEASE_VERSION/'"$RELEASE_VERSION"'/g' dist/package.json
run: sed -i 's/RELEASE_VERSION/'"${{ github.event.release.tag_name }}"'/g' dist/package.json

- name: Publish package
run: |
Expand Down
2 changes: 1 addition & 1 deletion dist/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ma-residence/mr-js-sdk",
"version": "1.0.5",
"version": "RELEASE_VERSION",
"description": "ma-residence.fr js SDK",
"main": "index.js",
"publishConfig": {
Expand Down

0 comments on commit 6b9201c

Please sign in to comment.