@duonghieu0712z/create-tauri-vue-template 0.1.2 → 0.1.3

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duonghieu0712z/create-tauri-vue-template",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Create a Tauri 2 + Vue 3 desktop app from the tauri-vue-template starter.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -31,19 +31,20 @@ jobs:
31
31
  require 'securerandom'
32
32
 
33
33
  ref = ENV.fetch('GITHUB_REF_NAME')
34
- version = ref.sub(/^v/, '')
35
- if version == ref
34
+ event_name = ENV.fetch('GITHUB_EVENT_NAME')
35
+ heading_name = event_name == 'workflow_dispatch' ? 'Unreleased' : ref.sub(/^v/, '')
36
+ if heading_name == ref
36
37
  abort 'package.json is required to resolve the release version.' unless File.exist?('package.json')
37
- version = JSON.parse(File.read('package.json')).fetch('version')
38
+ heading_name = JSON.parse(File.read('package.json')).fetch('version')
38
39
  end
39
40
 
40
- body = "Version #{version} release artifacts."
41
+ body = "#{heading_name} release artifacts."
41
42
 
42
43
  if File.exist?('CHANGELOG.md')
43
44
  begin
44
45
  content = File.read('CHANGELOG.md')
45
- escaped_version = Regexp.escape(version)
46
- pattern = /^##\s+(?<heading>\[?v?#{escaped_version}\]?(?:\s+-[^\r\n]*)?)\r?\n(?<body>.*?)(?=^##\s+|\z)/m
46
+ escaped_heading = Regexp.escape(heading_name)
47
+ pattern = /^##\s+(?<heading>\[?v?#{escaped_heading}\]?(?:\s+-[^\r\n]*)?)\r?\n(?<body>.*?)(?=^##\s+|\z)/m
47
48
  match = content.match(pattern)
48
49
 
49
50
  if match && !match[:body].strip.empty?
@@ -82,12 +83,16 @@ jobs:
82
83
  include:
83
84
  - os: macos-latest
84
85
  label: macos-aarch64
86
+ assetPlatform: macos
85
87
  - os: macos-15-intel
86
88
  label: macos-x86_64
89
+ assetPlatform: macos
87
90
  - os: ubuntu-latest
88
91
  label: ubuntu
92
+ assetPlatform: linux
89
93
  - os: windows-latest
90
94
  label: windows
95
+ assetPlatform: windows
91
96
 
92
97
  steps:
93
98
  - name: Checkout repository
@@ -131,4 +136,4 @@ jobs:
131
136
  releaseBody: ${{ needs.changelog.outputs.body }}
132
137
  releaseDraft: true
133
138
  prerelease: false
134
- releaseAssetNamePattern: '[mainBinaryName]-v[version]-[platform]-[arch][setup][ext]'
139
+ releaseAssetNamePattern: '[name]-v[version]-${{ matrix.assetPlatform }}-[arch][setup][ext]'