Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/customrss #65

Merged
merged 2 commits into from
Jan 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 48 additions & 48 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,55 +1,55 @@
name: Release Obsidian plugin
on:
push:
tags:
- "*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.1.0
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "18.x"
- name: Extract tag name
run: echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Create annotation for build error
run: |
sed -i 's/"version": .*/"version": "${{ env.TAG_NAME }}",/' manifest.json;
sed -i 's/"version": .*/"version": "${{ env.TAG_NAME }}",/' package.json;
# name: Release Obsidian plugin
# on:
# push:
# tags:
# - "*"
# jobs:
# build:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3.1.0
# - name: Use Node.js
# uses: actions/setup-node@v3
# with:
# node-version: "18.x"
# - name: Extract tag name
# run: echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
# - name: Create annotation for build error
# run: |
# sed -i 's/"version": .*/"version": "${{ env.TAG_NAME }}",/' manifest.json;
# sed -i 's/"version": .*/"version": "${{ env.TAG_NAME }}",/' package.json;

- name: Build plugin
run: |
npm install
npm run build
# - name: Build plugin
# run: |
# npm install
# npm run build

- name: Push Version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
tag="${GITHUB_REF#refs/tags/}"
# - name: Push Version
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# tag="${GITHUB_REF#refs/tags/}"

git config --global user.email "semantic@release.com"
git config --global user.name "Semantic Release"
# git config --global user.email "semantic@release.com"
# git config --global user.name "Semantic Release"

git add manifest.json
git add package.json
git commit -m "Bump version to $tag [skip ci]"
git push origin HEAD:master
# git add manifest.json
# git add package.json
# git commit -m "Bump version to $tag [skip ci]"
# git push origin HEAD:master

gh pr create \
--title "Bump version to $tag" \
--body "Bump version to $tag" \
--base dev --head $GITHUB_REPOSITORY:$GITHUB_REF
# gh pr create \
# --title "Bump version to $tag" \
# --body "Bump version to $tag" \
# --base dev --head $GITHUB_REPOSITORY:$GITHUB_REF

- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
tag="${GITHUB_REF#refs/tags/}"
# - name: Create release
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# tag="${GITHUB_REF#refs/tags/}"

gh release create "$tag" \
--title="$tag" \
--draft \
main.js manifest.json styles.css
# gh release create "$tag" \
# --title="$tag" \
# --draft \
# main.js manifest.json styles.css
2 changes: 0 additions & 2 deletions .github/workflows/semantic-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ jobs:
run: npm install @semantic-release/git @semantic-release/changelog @semantic-release/exec -D
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
run: npm audit signatures
- name: Set permission
run: chmod +x ./set-version.sh
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.SEMANTIC_TOKEN }}
Expand Down
17 changes: 15 additions & 2 deletions .releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,20 @@
[
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",

"@semantic-release/github",
[
"@semantic-release/exec",
{ "prepareCmd": "./set-version.sh ${nextRelease.version}" },
],
[
"@semantic-release/git",
{
"assets": ["manifest.json", "docs", "package.json"],
"message": "chore(release): ${nextRelease.version} [skip ci]",
},
],
[
"@semantic-release/github",
{ "assets": ["main.js", "manifest.json", "styles.css"] },
],
],
}