Skip to content

Commit

Permalink
Merge pull request #4 from HiImGiovi/polishing
Browse files Browse the repository at this point in the history
--publish action
  • Loading branch information
HiImGiovi authored Oct 9, 2024
2 parents f0b2355 + c533bc7 commit 2015b98
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 9 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,6 @@ on:
jobs:
test:
runs-on: ubuntu-latest
# services:
# hana:
# image: saplabs/hanaexpress:latest
# options: >-
# --master-password Password1!
# --agree-to-sap-license
# --hostname 3c423914c15f

strategy:
matrix:
node-version: [16, 18, 20, 22]
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Publish

on:
workflow_run:
workflows: [CI]
branches: [main]
types: [completed] # Attiva quando il workflow CI è completato

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
publish:
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'push' }} # Verifica che CI sia completato con successo e l'evento sia un push
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
registry-url: https://registry.npmjs.org/

- name: Install dependencies
run: npm ci

- name: Create and publish a release with changesets
uses: changesets/action@v1
with:
publish: npm publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pino-hana",
"version": "1.0.0",
"version": "0.0.0",
"main": "index.js",
"type": "module",
"scripts": {
Expand Down

0 comments on commit 2015b98

Please sign in to comment.