-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #69 from nitech-create:refactor
リファクタリング & バグ修正 & Chrome Web Storeでの公開を記述
- Loading branch information
Showing
104 changed files
with
2,921 additions
and
2,598 deletions.
There are no files selected for viewing
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Check Version Increase | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
branches: | ||
- main | ||
paths: | ||
- "src/**" | ||
|
||
jobs: | ||
get-main-version: | ||
uses: ./.github/workflows/manifest-version.yml | ||
with: | ||
ref: refs/heads/main | ||
checkout-ref: main | ||
|
||
get-current-version: | ||
uses: ./.github/workflows/manifest-version.yml | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
|
||
check-version: | ||
runs-on: ubuntu-latest | ||
needs: [get-main-version, get-current-version] | ||
|
||
steps: | ||
- run: | | ||
echo "current: ${{ needs.get-current-version.outputs.version }}" | ||
- uses: denoland/setup-deno@v2 | ||
with: | ||
deno-version: v2.x | ||
|
||
- name: compare versions | ||
env: | ||
MAIN_VERSION: ${{ needs.get-main-version.outputs.version }} | ||
CURRENT_VERSION: ${{ needs.get-current-version.outputs.version }} | ||
run: test "$MAIN_VERSION" != "$CURRENT_VERSION" |
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 was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Lint and Check Format | ||
|
||
on: push | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 3 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: denoland/setup-deno@v2 | ||
with: | ||
deno-version: v2.x | ||
|
||
- name: lint | ||
run: deno lint | ||
|
||
format: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 3 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: denoland/setup-deno@v2 | ||
with: | ||
deno-version: v2.x | ||
|
||
- name: check format | ||
run: deno fmt --check | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 3 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: denoland/setup-deno@v2 | ||
with: | ||
deno-version: v2.x | ||
|
||
- name: build | ||
run: deno task build |
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Manifest Version | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
ref: | ||
required: true | ||
type: string | ||
checkout-ref: | ||
type: string | ||
outputs: | ||
version: | ||
value: ${{ jobs.get-version.outputs.version }} | ||
|
||
jobs: | ||
get-version: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 3 | ||
|
||
outputs: | ||
version: ${{ steps.get-version.outputs.version }} | ||
|
||
steps: | ||
- run: 'echo "ref: ${{ inputs.ref }}"' | ||
|
||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ inputs.checkout-ref || inputs.ref }} | ||
|
||
- uses: actions/checkout@v4 | ||
|
||
- uses: denoland/setup-deno@v2 | ||
with: | ||
deno-version: v2.x | ||
|
||
- name: get version | ||
id: get-version | ||
run: | | ||
VERSION=$(NOCOLOR="true" git show "${{ inputs.ref }}:./src/manifest.jsonc" | deno run scripts/getManifestVersion.ts) | ||
echo "Version: $VERSION" | ||
echo "version=$VERSION" >> $GITHUB_OUTPUT |
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,36 @@ | ||
name: attach build artifact to release | ||
name: "Release: Attach Artifact" | ||
|
||
on: | ||
release: | ||
types: | ||
- published | ||
- released | ||
- prereleased | ||
|
||
permissions: write-all | ||
|
||
env: | ||
TEMP_ASSET_NAME: asset.zip | ||
FILE_NAME: nitech-moodle-extension-40a-${{ github.event.release.tag_name }}.zip | ||
|
||
jobs: | ||
attach-build-artifact: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 1 | ||
timeout-minutes: 3 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set environment variables | ||
env: | ||
TAG_NAME: ${{ github.event.release.tag_name }} | ||
run: | | ||
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Deno | ||
uses: denoland/setup-deno@v1 | ||
- uses: denoland/setup-deno@v2 | ||
with: | ||
deno-version: v1.x | ||
deno-version: v2.x | ||
|
||
- name: Build | ||
- name: build | ||
run: deno task build | ||
|
||
- name: Create zip | ||
run: cd ./dist; zip $TEMP_ASSET_NAME -r . | ||
- name: zip artifacts | ||
run: cd ./dist; zip $FILE_NAME -r . | ||
|
||
- name: Upload release asset | ||
id: upload-release-asset | ||
uses: actions/upload-release-asset@v1 | ||
- name: upload | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: ./dist/${{ env.TEMP_ASSET_NAME }} | ||
asset_name: nitech-moodle-extension-40a-${{ env.TAG_NAME }}.zip | ||
asset_content_type: application/zip | ||
run: | | ||
gh release upload ${{ github.event.release.tag_name }} $FILE_NAME |
Oops, something went wrong.