mirror of
https://github.com/lostpaul/obsidian-folder-notes.git
synced 2026-07-22 07:40:24 +00:00
Update beta-release.yaml
This commit is contained in:
parent
b69e5d66f9
commit
1310db6be7
1 changed files with 27 additions and 3 deletions
30
.github/workflows/beta-release.yaml
vendored
30
.github/workflows/beta-release.yaml
vendored
|
|
@ -22,14 +22,37 @@ jobs:
|
|||
- name: Checkout main branch
|
||||
run: git checkout main
|
||||
|
||||
- name: Extract version from tag
|
||||
id: extract_version
|
||||
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
|
||||
|
||||
- name: Strip -beta from version
|
||||
run: |
|
||||
VERSION=${{ env.VERSION }}
|
||||
RELEASE_VERSION=${VERSION%-beta}
|
||||
echo "RELEASE_VERSION=$RELEASE_VERSION" >> $GITHUB_ENV
|
||||
|
||||
- name: Update manifest-beta.json
|
||||
run: |
|
||||
VERSION=${{ env.VERSION }}
|
||||
jq --arg version "$VERSION" '.version = $version' manifest-beta.json > manifest-beta-temp.json
|
||||
mv manifest-beta-temp.json manifest-beta.json
|
||||
|
||||
- name: Commit and push changes
|
||||
run: |
|
||||
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git config --local user.name "github-actions[bot]"
|
||||
git add manifest-beta.json
|
||||
git commit -m "Update manifest-beta.json to version $VERSION"
|
||||
git push origin main
|
||||
|
||||
- name: npm build
|
||||
run: |
|
||||
npm install
|
||||
npm run build --if-present
|
||||
|
||||
- name: Set Release Name
|
||||
id: set_release_name
|
||||
run: echo "RELEASE_NAME=$(echo $GITHUB_REF | sed 's/refs\/tags\///')" >> $GITHUB_ENV
|
||||
run: echo "RELEASE_NAME=${{ env.RELEASE_VERSION }}" >> $GITHUB_ENV
|
||||
|
||||
- name: Create Plugin beta release
|
||||
uses: ncipollo/release-action@v1.12.0
|
||||
|
|
@ -38,4 +61,5 @@ jobs:
|
|||
prerelease: true
|
||||
artifacts: "main.js,manifest.json,styles.css"
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
tag: ${{ env.RELEASE_NAME }}
|
||||
tag: ${{ env.VERSION }}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue