-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7d64829
commit 5e0a2c7
Showing
5 changed files
with
104 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,74 +1,95 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- 'v*' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20" | ||
|
||
- name: Install dependencies | ||
run: npm i | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
- name: Create zip | ||
run: npm run plugin-zip | ||
|
||
- name: Archive production artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: plugin_zip | ||
path: wp-block-nonogram.zip | ||
|
||
release: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: get tag name | ||
run: echo "TAG_NAME=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | ||
|
||
- name: Create release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
body: | | ||
This is the release for tag ${{ env.TAG_NAME }}. | ||
draft: false | ||
prerelease: false | ||
|
||
- name: Download production artifact | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: plugin_zip | ||
|
||
- name: Upload release artifact | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: wp-block-nonogram.zip | ||
asset_name: wp-block-nonogram.zip | ||
asset_content_type: application/zip | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20' | ||
|
||
- name: Install dependencies | ||
run: npm i | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
- name: Archive standalone artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: standalone_js | ||
path: standalone/view.js | ||
|
||
- name: Create zip | ||
run: npm run plugin-zip | ||
|
||
- name: Archive plugin artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: plugin_zip | ||
path: wp-block-nonogram.zip | ||
|
||
release: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: get tag name | ||
run: echo "TAG_NAME=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | ||
|
||
- name: Create release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
body: | | ||
This is the release for tag ${{ env.TAG_NAME }}. | ||
draft: false | ||
prerelease: false | ||
|
||
- name: Download standalone artifact | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: standalone_js | ||
|
||
- name: Upload standalone artifact | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: standalone/view.js | ||
asset_name: nonogram.js | ||
asset_content_type: text/javascript | ||
|
||
- name: Download plugin artifact | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: plugin_zip | ||
|
||
- name: Upload plugin artifact | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: wp-block-nonogram.zip | ||
asset_name: wp-block-nonogram.zip | ||
asset_content_type: application/zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
.DS_Store | ||
|
||
build/ | ||
standalone/ | ||
|
||
# Logs | ||
logs | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters