-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (44 loc) · 1.33 KB
/
Copy pathmain.yml
File metadata and controls
51 lines (44 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Functionly build and publish
on:
workflow_dispatch:
inputs:
version_type:
description: Version type publish
required: true
default: patch
type: choice
options:
- patch
- minor
- major
jobs:
live:
runs-on: ubuntu-latest
environment: live
permissions:
id-token: write # Required for OIDC
contents: write # Required for pushing tags
steps:
- uses: actions/checkout@v7
- name: Set up Node.js
uses: actions/setup-node@v7
with:
node-version: "24"
registry-url: "https://registry.npmjs.org"
cache-dependency-path: false
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Auto Increment Version, and Publish to npmjs
run: |
git config --global user.email "jaystack-ci@jaystack.com"
git config --global user.name "jaystack-ci"
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
npm version ${{ inputs.version_type }} -m "Auto-increment version: %s" --force
npm publish --provenance
- name: Git operations
run: |
git tag -f latest
git push -f --tags
git push