Skip to content

Commit

Permalink
Merge branch 'staging'
Browse files Browse the repository at this point in the history
  • Loading branch information
folland87 committed Feb 15, 2024
2 parents a0debdd + 1937b42 commit 75bc2fe
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 20 deletions.
23 changes: 3 additions & 20 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ name: Publish package to Npmjs and notify on Mattermost

on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
branch:
- main

env:
DEPLOYMENT_URL: https://www.npmjs.com/package/@dataesr/dsfr-plus
DEPLOYMENT_URL: https://dataesr.github.io/dsfr-plus/
MM_NOTIFICATION_CHANNEL: bots

permissions:
Expand All @@ -20,22 +20,6 @@ concurrency:
cancel-in-progress: true

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v4
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
scope: "@dataesr"
- run: npm ci
- run: npm run build
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

deploy-examples:
environment:
name: github-pages
Expand Down Expand Up @@ -65,7 +49,6 @@ jobs:

notify:
needs:
- publish
- deploy-examples
if: always()
runs-on: ubuntu-latest
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/tags.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Publish package to Npmjs and notify on Mattermost

on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"

env:
DEPLOYMENT_URL: https://www.npmjs.com/package/@dataesr/dsfr-plus
MM_NOTIFICATION_CHANNEL: bots

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v4
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
scope: "@dataesr"
- run: npm ci
- run: npm run build
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

notify:
needs:
- publish
if: always()
runs-on: ubuntu-latest
steps:
- uses: dataesr/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN}}
mattermost_webhook_url: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
mattermost_channel: ${{ env.MM_NOTIFICATION_CHANNEL}}
deployment_url: ${{ env.DEPLOYMENT_URL }}

0 comments on commit 75bc2fe

Please sign in to comment.