Skip to content

Commit

Permalink
try to composite action
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Mar 30, 2024
1 parent 8f4798d commit 2e21439
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 15 deletions.
11 changes: 2 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,20 +54,13 @@ jobs:
id-token: write

steps:
- name: Checkout
- name: Git Checkout
id: checkout
uses: actions/checkout@v4
- name: Test Local Action
uses: actions/setup-node@v4
with:
node-version: 20.x
registry-url: 'https://registry.npmjs.org'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Test action
id: test-action
uses: ./
with:
target-branch: main
provenance: true
node-auth-token: ${{ secrets.NPM_TOKEN }}
26 changes: 20 additions & 6 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,25 @@ inputs:
published a package'
required: false
default: 'false'

outputs:
version:
description: 'Published release version'
node-auth-token:
description: 'npm token able to publish on npm regirty'
required: true

runs:
using: node20
main: dist/index.js
using: composite
steps:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20.x
registry-url: 'https://registry.npmjs.org'
env:
NODE_AUTH_TOKEN: ${{ inputs.node-auth-token }}
- name: Git Checkout
id: checkout
uses: actions/checkout@v4
- name: Publish version
uses: ./npm-semver-action.yml
with:
target-branch: ${{ inputs.target-branch }}
provenance: ${{ inputs.provenance }}
3 changes: 3 additions & 0 deletions npm-semver-action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
runs:
using: node20
main: dist/index.js

0 comments on commit 2e21439

Please sign in to comment.