@vkontakte/vk-miniapps-deploy 0.1.7 → 0.1.8-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,39 @@
1
+ name: Publish Workflow / Bump version
2
+ description: It bump version of provided package
3
+
4
+ inputs:
5
+ version:
6
+ description: <newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease
7
+ required: true
8
+ npm_tag:
9
+ description: tag for NPM artifact
10
+ required: false
11
+
12
+ outputs:
13
+ prev_version:
14
+ value: ${{ steps.internal_id_prev_version.outputs.value }}
15
+ next_version:
16
+ value: ${{ steps.internal_id_next_version.outputs.value }}
17
+
18
+ runs:
19
+ using: composite
20
+ steps:
21
+ - name: Saving current version to env
22
+ id: internal_id_prev_version
23
+ run: echo "value=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
24
+ shell: bash
25
+
26
+ - name: Bump version
27
+ if: ${{ !inputs.npm_tag }}
28
+ run: yarn version --new-version "${{ inputs.version }}" --no-commit-hooks
29
+ shell: bash
30
+
31
+ - name: Bump version with npm_tag
32
+ if: ${{ inputs.npm_tag }}
33
+ run: yarn version --new-version "${{ inputs.version }}" --preid ${{ inputs.npm_tag }} --no-commit-hooks
34
+ shell: bash
35
+
36
+ - name: Saving new version to env
37
+ id: internal_id_next_version
38
+ run: echo "value=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
39
+ shell: bash
@@ -0,0 +1,48 @@
1
+ name: Publish Workflow / Complete
2
+ description: It finish publishing
3
+
4
+ inputs:
5
+ branch:
6
+ description: target branch for git push
7
+ required: true
8
+ prev_version:
9
+ description: package's prev version
10
+ required: true
11
+ next_version:
12
+ description: package's next version
13
+ required: true
14
+ npm_tag:
15
+ description: tag for NPM artifact
16
+ required: false
17
+ token:
18
+ description: token for write access to repository
19
+ required: true
20
+ npm_token:
21
+ description: token for publish package to NPM
22
+
23
+ runs:
24
+ using: composite
25
+ steps:
26
+ - name: Create tag
27
+ run: git tag vk-miniapps-deploy@${{ inputs.next_version }}
28
+ shell: bash
29
+
30
+ - name: Pushing changes
31
+ uses: ad-m/github-push-action@master
32
+ with:
33
+ github_token: ${{ inputs.token }}
34
+ branch: ${{ inputs.branch }}
35
+
36
+ - name: Publishing release
37
+ if: ${{ !inputs.npm_tag }}
38
+ run: yarn publish --access public --non-interactive
39
+ env:
40
+ NODE_AUTH_TOKEN: ${{ inputs.npm_token }}
41
+ shell: bash
42
+
43
+ - name: Publishing release with npm_tag
44
+ if: ${{ inputs.npm_tag }}
45
+ run: yarn publish --access public --non-interactive --tag ${{ inputs.npm_tag }}
46
+ env:
47
+ NODE_AUTH_TOKEN: ${{ inputs.npm_token }}
48
+ shell: bash
@@ -0,0 +1,23 @@
1
+ name: Publish Workflow / Setup
2
+ description: It setting up the repository environment for publish
3
+
4
+ runs:
5
+ using: composite
6
+ steps:
7
+ - name: Setup NodeJS
8
+ uses: actions/setup-node@v4
9
+ with:
10
+ node-version: 20
11
+ cache: 'yarn'
12
+ always-auth: true
13
+ registry-url: 'https://registry.npmjs.org'
14
+
15
+ - name: Install dependencies
16
+ run: yarn install --frozen-lockfile --ignore-scripts
17
+ shell: bash
18
+
19
+ - name: Set Git credentials
20
+ run: |
21
+ git config --local user.email "actions@github.com"
22
+ git config --local user.name "GitHub Action"
23
+ shell: bash
@@ -3,38 +3,41 @@ name: 'Publish'
3
3
  on:
4
4
  workflow_dispatch:
5
5
  inputs:
6
- version:
7
- description: 'version (without v prefix)'
6
+ new_version:
7
+ description: 'version type:'
8
+ type: choice
9
+ default: 'minor'
10
+ options:
11
+ - patch
12
+ - minor
13
+ - major
8
14
  required: true
9
15
 
16
+ run-name: Publish vk-miniapps-deploy ${{ inputs.new_version }}
17
+
10
18
  jobs:
11
19
  publish:
12
20
  runs-on: ubuntu-latest
13
21
  steps:
14
- - uses: actions/checkout@v3
22
+ - name: Checkout
23
+ uses: actions/checkout@v4
15
24
  with:
16
25
  token: ${{ secrets.DEVTOOLS_GITHUB_TOKEN }}
17
26
 
18
- - uses: actions/setup-node@v3
19
- with:
20
- node-version: 16
21
- cache: 'yarn'
22
- always-auth: true
23
- registry-url: 'https://registry.npmjs.org'
27
+ - name: Setting up the repository environment
28
+ uses: ./.github/actions/setup
24
29
 
25
- - name: Set Git credentials
26
- run: |
27
- git config --local user.email "actions@github.com"
28
- git config --local user.name "GitHub Action"
29
- - run: yarn version --new-version ${{ github.event.inputs.version }} --no-commit-hooks
30
+ - name: Bump version
31
+ id: updated_versions_info
32
+ uses: ./.github/actions/bump-version
33
+ with:
34
+ version: ${{ github.event.inputs.new_version }}
30
35
 
31
- - name: Pushing changes
32
- uses: ad-m/github-push-action@master
36
+ - name: Complete publish
37
+ uses: ./.github/actions/complete-publish
33
38
  with:
34
- github_token: ${{ secrets.DEVTOOLS_GITHUB_TOKEN }}
35
39
  branch: ${{ github.ref }}
36
-
37
- - name: Publushing release
38
- run: yarn publish --access public --non-interactive
39
- env:
40
- NODE_AUTH_TOKEN: ${{ secrets.NPMJS_PUBLISH_TOKEN }}
40
+ prev_version: ${{ steps.updated_versions_info.outputs.prev_version }}
41
+ next_version: ${{ steps.updated_versions_info.outputs.next_version }}
42
+ token: ${{ secrets.DEVTOOLS_GITHUB_TOKEN }}
43
+ npm_token: ${{ secrets.NPMJS_PUBLISH_TOKEN }}
@@ -0,0 +1,58 @@
1
+ name: 'Publish (pre-release)'
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ new_version:
7
+ description: 'version type (use prerelease for bumping pre-release version):'
8
+ required: true
9
+ type: choice
10
+ default: 'prerelease'
11
+ options:
12
+ - prepatch
13
+ - preminor
14
+ - premajor
15
+ - prerelease
16
+ npm_tag:
17
+ required: true
18
+ description: 'NPM tag:'
19
+ type: choice
20
+ default: 'beta'
21
+ options:
22
+ - alpha
23
+ - beta
24
+ - rc
25
+ custom_version:
26
+ description: 'use syntax x.y.z-beta.0, without "v" (it ignore "version type" parameter):'
27
+ required: false
28
+
29
+ run-name: Publish ${{ inputs.new_version }} vk-miniapps-deploy ${{ inputs.custom_version }}
30
+
31
+ jobs:
32
+ publish:
33
+ runs-on: ubuntu-latest
34
+ steps:
35
+ - name: Checkout
36
+ uses: actions/checkout@v4
37
+ with:
38
+ token: ${{ secrets.DEVTOOLS_GITHUB_TOKEN }}
39
+
40
+ - name: Setting up the repository environment
41
+ uses: ./.github/actions/setup
42
+
43
+ - name: Bump version
44
+ id: updated_versions_info
45
+ uses: ./.github/actions/bump-version
46
+ with:
47
+ version: ${{ github.event.inputs.custom_version || github.event.inputs.new_version }}
48
+ npm_tag: ${{ github.event.inputs.npm_tag }}
49
+
50
+ - name: Complete publish
51
+ uses: ./.github/actions/complete-publish
52
+ with:
53
+ branch: ${{ github.ref }}
54
+ prev_version: ${{ steps.updated_versions_info.outputs.prev_version }}
55
+ next_version: ${{ steps.updated_versions_info.outputs.next_version }}
56
+ npm_tag: ${{ github.event.inputs.npm_tag }}
57
+ token: ${{ secrets.DEVTOOLS_GITHUB_TOKEN }}
58
+ npm_token: ${{ secrets.NPMJS_PUBLISH_TOKEN }}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vkontakte/vk-miniapps-deploy",
3
- "version": "0.1.7",
3
+ "version": "0.1.8-rc.0",
4
4
  "description": "Deploy to VK Mini Apps hosting with one simple command",
5
5
  "main": "index.js",
6
6
  "scripts": {