Fixed release and publishing process
This commit is contained in:
60
.github/workflows/release.yml
vendored
60
.github/workflows/release.yml
vendored
@@ -58,35 +58,35 @@ jobs:
|
||||
asset_name: ${{ env.PLUGIN_NAME }}-${{ steps.build.outputs.tag_name }}.zip
|
||||
asset_content_type: application/zip
|
||||
|
||||
# - name: Upload main.js
|
||||
# id: upload-main
|
||||
# uses: actions/upload-release-asset@v1
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# with:
|
||||
# upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
# asset_path: ${{ env.DIST_FOLDER }}/main.js
|
||||
# asset_name: main.js
|
||||
# asset_content_type: text/javascript
|
||||
- name: Upload main.js
|
||||
id: upload-main
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ${{ env.DIST_FOLDER }}/main.js
|
||||
asset_name: main.js
|
||||
asset_content_type: text/javascript
|
||||
|
||||
# - name: Upload manifest.json
|
||||
# id: upload-manifest
|
||||
# uses: actions/upload-release-asset@v1
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# with:
|
||||
# upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
# asset_path: ${{ env.DIST_FOLDER }}/manifest.json
|
||||
# asset_name: manifest.json
|
||||
# asset_content_type: application/json
|
||||
- name: Upload manifest.json
|
||||
id: upload-manifest
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ./manifest.json
|
||||
asset_name: manifest.json
|
||||
asset_content_type: application/json
|
||||
|
||||
# - name: Upload styles.css
|
||||
# id: upload-css
|
||||
# uses: actions/upload-release-asset@v1
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# with:
|
||||
# upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
# asset_path: ${{ env.DIST_FOLDER }}/styles.css
|
||||
# asset_name: styles.css
|
||||
# asset_content_type: text/css
|
||||
- name: Upload styles.css
|
||||
id: upload-css
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ${{ env.DIST_FOLDER }}/styles.css
|
||||
asset_name: styles.css
|
||||
asset_content_type: text/css
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"id": "scambier.obsidian-omnisearch",
|
||||
"name": "Omnisearch",
|
||||
"version": "0.1.0",
|
||||
"minAppVersion": "0.14.2",
|
||||
"description": "Search over organization",
|
||||
"author": "Simon Cambier",
|
||||
"authorUrl": "",
|
||||
"isDesktopOnly": false
|
||||
}
|
||||
10
manifest.json
Normal file
10
manifest.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"id": "scambier.obsidian-omnisearch",
|
||||
"name": "Omnisearch",
|
||||
"version": "0.1.1",
|
||||
"minAppVersion": "0.14.2",
|
||||
"description": "Search over organization",
|
||||
"author": "Simon Cambier",
|
||||
"authorUrl": "",
|
||||
"isDesktopOnly": false
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "scambier.obsidian-search",
|
||||
"version": "0.0.1",
|
||||
"version": "0.1.1",
|
||||
"description": "Search over organization",
|
||||
"main": "dist/main.js",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import { readFileSync, writeFileSync } from "fs";
|
||||
import { readFileSync, writeFileSync } from 'fs'
|
||||
|
||||
const targetVersion = process.env.npm_package_version;
|
||||
const targetVersion = process.env.npm_package_version
|
||||
|
||||
// read minAppVersion from manifest.json and bump version to target version
|
||||
let manifest = JSON.parse(readFileSync("manifest.json", "utf8"));
|
||||
const { minAppVersion } = manifest;
|
||||
manifest.version = targetVersion;
|
||||
writeFileSync("manifest.json", JSON.stringify(manifest, null, "\t"));
|
||||
const manifest = JSON.parse(readFileSync('manifest.json', 'utf8'))
|
||||
const { minAppVersion } = manifest
|
||||
manifest.version = targetVersion
|
||||
writeFileSync('manifest.json', JSON.stringify(manifest, null, '\t'))
|
||||
|
||||
// update versions.json with target version and minAppVersion from manifest.json
|
||||
let versions = JSON.parse(readFileSync("versions.json", "utf8"));
|
||||
versions[targetVersion] = minAppVersion;
|
||||
writeFileSync("versions.json", JSON.stringify(versions, null, "\t"));
|
||||
const versions = JSON.parse(readFileSync('versions.json', 'utf8'))
|
||||
versions[targetVersion] = minAppVersion
|
||||
writeFileSync('versions.json', JSON.stringify(versions, null, '\t'))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"1.0.0": "0.9.7",
|
||||
"1.0.1": "0.12.0"
|
||||
"0.1.0": "0.14.2",
|
||||
"0.1.1": "0.14.2"
|
||||
}
|
||||
Reference in New Issue
Block a user