-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
35 lines (30 loc) · 967 Bytes
/
action.yml
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
name: publish-with-yarn-classic
description: Publishes a NPM package using Yarn Classic
branding:
icon: upload-cloud
color: green
inputs:
npm-auth-token:
description: "NPM token"
required: true
runs:
using: composite
steps:
- name: Get version from git tag 🏷️
id: version
uses: jannemattila/get-version-from-tag@v3
- name: Set version to release tag 📝
shell: bash
run: yarn version --no-commit-hooks --no-git-tag-version --new-version ${{
steps.version.outputs.version }}
- name: Publish 🚀
shell: bash
run: yarn publish
env:
NODE_AUTH_TOKEN: ${{ inputs.npm-auth-token }}
- name: Push version changes to main branch 📤
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "chore: release ${{ github.event.release.tag_name }}"
branch: ${{ github.event.repository.default_branch }}
file_pattern: package.json