From f003df56d63019b4783c214417d0ff7621453a79 Mon Sep 17 00:00:00 2001 From: sator-imaging <16752340+sator-imaging@users.noreply.github.com> Date: Sat, 14 Feb 2026 10:18:21 +0900 Subject: [PATCH 01/14] feat: create release on push --- .github/workflows/create-release.yml | 32 ++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/create-release.yml diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml new file mode 100644 index 0000000..86aca59 --- /dev/null +++ b/.github/workflows/create-release.yml @@ -0,0 +1,32 @@ +name: Create Release from archives + +on: + push: + branches: + - main + paths: + - 'archives/**' + +permissions: + contents: write + +jobs: + create-release: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + + - name: Generate tag name + id: tag + run: | + TAG_NAME="archives-$(date +'%Y%m%d')" + echo "tag_name=$TAG_NAME" >> $GITHUB_OUTPUT + + - name: Create Release (with auto tag) + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh release create "${{ steps.tag.outputs.tag_name }}" \ + --title "Release ${{ steps.tag.outputs.tag_name }}" \ + --notes "Automated release for archives update" From b052002bec10e05b4223e6db9cc71eedbf6e0d0f Mon Sep 17 00:00:00 2001 From: sator-imaging <16752340+sator-imaging@users.noreply.github.com> Date: Sat, 14 Feb 2026 10:24:36 +0900 Subject: [PATCH 02/14] Add test.txt with initial test content --- archives/test.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 archives/test.txt diff --git a/archives/test.txt b/archives/test.txt new file mode 100644 index 0000000..0527e6b --- /dev/null +++ b/archives/test.txt @@ -0,0 +1 @@ +This is a test From 76373f6ecaf971a90de61dc846c05b3dd4a17e31 Mon Sep 17 00:00:00 2001 From: sator-imaging <16752340+sator-imaging@users.noreply.github.com> Date: Sat, 14 Feb 2026 10:30:22 +0900 Subject: [PATCH 03/14] add link to release body --- .github/workflows/create-release.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 86aca59..0ea8c17 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -23,10 +23,18 @@ jobs: TAG_NAME="archives-$(date +'%Y%m%d')" echo "tag_name=$TAG_NAME" >> $GITHUB_OUTPUT - - name: Create Release (with auto tag) + - name: Get changed archive file + id: file + run: | + FILE_PATH=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep '^archives/' | head -n 1) + echo "file_path=$FILE_PATH" >> $GITHUB_OUTPUT + + - name: Create Release (with file URL) env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | + FILE_URL="https://github.com/${{ github.repository }}/blob/main/${{ steps.file.outputs.file_path }}" + gh release create "${{ steps.tag.outputs.tag_name }}" \ --title "Release ${{ steps.tag.outputs.tag_name }}" \ - --notes "Automated release for archives update" + --notes "📄 Updated file: $FILE_URL" From a24be6968129bf53eefe2b2273e52b6b48e8ff84 Mon Sep 17 00:00:00 2001 From: sator-imaging <16752340+sator-imaging@users.noreply.github.com> Date: Sat, 14 Feb 2026 10:30:40 +0900 Subject: [PATCH 04/14] Create ddd.txt --- archives/ddd.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 archives/ddd.txt diff --git a/archives/ddd.txt b/archives/ddd.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/archives/ddd.txt @@ -0,0 +1 @@ + From c6e0bdbafee6bfc2cf4d115775e8d530a298a478 Mon Sep 17 00:00:00 2001 From: sator-imaging <16752340+sator-imaging@users.noreply.github.com> Date: Sat, 14 Feb 2026 10:31:23 +0900 Subject: [PATCH 05/14] Create test2.txt --- archives/test2.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 archives/test2.txt diff --git a/archives/test2.txt b/archives/test2.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/archives/test2.txt @@ -0,0 +1 @@ + From e87c87961c8d8c1fc75823e3aca7805dcf872d69 Mon Sep 17 00:00:00 2001 From: sator-imaging <16752340+sator-imaging@users.noreply.github.com> Date: Sat, 14 Feb 2026 10:35:12 +0900 Subject: [PATCH 06/14] fix --- .github/workflows/create-release.yml | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 0ea8c17..ff231ad 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -16,6 +16,8 @@ jobs: steps: - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + with: + fetch-depth: 2 # For git diff - name: Generate tag name id: tag @@ -23,18 +25,27 @@ jobs: TAG_NAME="archives-$(date +'%Y%m%d')" echo "tag_name=$TAG_NAME" >> $GITHUB_OUTPUT - - name: Get changed archive file - id: file + - name: Detect changed archive file + id: archive run: | - FILE_PATH=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep '^archives/' | head -n 1) - echo "file_path=$FILE_PATH" >> $GITHUB_OUTPUT + echo "Changed files:" + git diff-tree --no-commit-id --name-only -r HEAD - - name: Create Release (with file URL) + FILE=$(git diff-tree --no-commit-id --name-only -r HEAD | grep "^archives/.*\.md$" | head -n 1) + + if [ -z "$FILE" ]; then + echo "Error: No archives markdown changes detected" + exit 1 + fi + + echo "file=$FILE" >> $GITHUB_OUTPUT + + - name: Create Release (with archive URL) env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - FILE_URL="https://github.com/${{ github.repository }}/blob/main/${{ steps.file.outputs.file_path }}" - + FILE_URL="https://github.com/${{ github.repository }}/blob/main/${{ steps.archive.outputs.file }}" + gh release create "${{ steps.tag.outputs.tag_name }}" \ --title "Release ${{ steps.tag.outputs.tag_name }}" \ - --notes "📄 Updated file: $FILE_URL" + --notes "📄 $FILE_URL" From f534c5f85245b83b3376579c97a5f2158dca0852 Mon Sep 17 00:00:00 2001 From: sator-imaging <16752340+sator-imaging@users.noreply.github.com> Date: Sat, 14 Feb 2026 10:35:27 +0900 Subject: [PATCH 07/14] Create test3.txt --- archives/test3.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 archives/test3.txt diff --git a/archives/test3.txt b/archives/test3.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/archives/test3.txt @@ -0,0 +1 @@ + From eb9c020d80954b092b8c21fb60daeffb1767749f Mon Sep 17 00:00:00 2001 From: sator-imaging <16752340+sator-imaging@users.noreply.github.com> Date: Sat, 14 Feb 2026 10:38:04 +0900 Subject: [PATCH 08/14] fix 2 --- .github/workflows/create-release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index ff231ad..de0eb41 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -5,7 +5,7 @@ on: branches: - main paths: - - 'archives/**' + - 'archives/**/*.md' permissions: contents: write @@ -31,10 +31,10 @@ jobs: echo "Changed files:" git diff-tree --no-commit-id --name-only -r HEAD - FILE=$(git diff-tree --no-commit-id --name-only -r HEAD | grep "^archives/.*\.md$" | head -n 1) + FILE=$(git diff-tree --no-commit-id --name-only -r HEAD | grep "^archives/.*$" | head -n 1) if [ -z "$FILE" ]; then - echo "Error: No archives markdown changes detected" + echo "Error: No archives changes detected" exit 1 fi From 9a55ffbd7c693475be51cdbb1f9aa10e3bdd0f5c Mon Sep 17 00:00:00 2001 From: sator-imaging <16752340+sator-imaging@users.noreply.github.com> Date: Sat, 14 Feb 2026 10:38:18 +0900 Subject: [PATCH 09/14] Create test.md --- archives/test.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 archives/test.md diff --git a/archives/test.md b/archives/test.md new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/archives/test.md @@ -0,0 +1 @@ + From b4d031d16a5c98f1e552382db94466b91b587db5 Mon Sep 17 00:00:00 2001 From: sator-imaging <16752340+sator-imaging@users.noreply.github.com> Date: Sat, 14 Feb 2026 10:40:20 +0900 Subject: [PATCH 10/14] Create test.md --- archives/0000/00/test.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 archives/0000/00/test.md diff --git a/archives/0000/00/test.md b/archives/0000/00/test.md new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/archives/0000/00/test.md @@ -0,0 +1 @@ + From d614f3b8895f6cfaa88d4a3fd24887669583d287 Mon Sep 17 00:00:00 2001 From: sator-imaging <16752340+sator-imaging@users.noreply.github.com> Date: Sat, 14 Feb 2026 10:41:39 +0900 Subject: [PATCH 11/14] cleanup --- archives/0000/00/test.md | 1 - archives/ddd.txt | 1 - archives/test.md | 1 - archives/test.txt | 1 - archives/test2.txt | 1 - archives/test3.txt | 1 - 6 files changed, 6 deletions(-) delete mode 100644 archives/0000/00/test.md delete mode 100644 archives/ddd.txt delete mode 100644 archives/test.md delete mode 100644 archives/test.txt delete mode 100644 archives/test2.txt delete mode 100644 archives/test3.txt diff --git a/archives/0000/00/test.md b/archives/0000/00/test.md deleted file mode 100644 index 8b13789..0000000 --- a/archives/0000/00/test.md +++ /dev/null @@ -1 +0,0 @@ - diff --git a/archives/ddd.txt b/archives/ddd.txt deleted file mode 100644 index 8b13789..0000000 --- a/archives/ddd.txt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/archives/test.md b/archives/test.md deleted file mode 100644 index 8b13789..0000000 --- a/archives/test.md +++ /dev/null @@ -1 +0,0 @@ - diff --git a/archives/test.txt b/archives/test.txt deleted file mode 100644 index 0527e6b..0000000 --- a/archives/test.txt +++ /dev/null @@ -1 +0,0 @@ -This is a test diff --git a/archives/test2.txt b/archives/test2.txt deleted file mode 100644 index 8b13789..0000000 --- a/archives/test2.txt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/archives/test3.txt b/archives/test3.txt deleted file mode 100644 index 8b13789..0000000 --- a/archives/test3.txt +++ /dev/null @@ -1 +0,0 @@ - From c162260ee5a75538564c08ad6d90efc62a34ae2c Mon Sep 17 00:00:00 2001 From: prozolic <42107886+prozolic@users.noreply.github.com> Date: Sat, 14 Feb 2026 12:27:38 +0900 Subject: [PATCH 12/14] Update .github/workflows/create-release.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/create-release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index de0eb41..595328f 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -13,6 +13,7 @@ permissions: jobs: create-release: runs-on: ubuntu-latest + timeout-minutes: 10 steps: - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 From 2a90fd99e08d332dae96ca7841488c1557727284 Mon Sep 17 00:00:00 2001 From: prozolic <42107886+prozolic@users.noreply.github.com> Date: Sat, 14 Feb 2026 12:28:45 +0900 Subject: [PATCH 13/14] Update .github/workflows/create-release.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/create-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 595328f..4a0ee3e 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -23,7 +23,7 @@ jobs: - name: Generate tag name id: tag run: | - TAG_NAME="archives-$(date +'%Y%m%d')" + TAG_NAME="archives-$(date +'%Y%m%d')-${GITHUB_SHA::7}" echo "tag_name=$TAG_NAME" >> $GITHUB_OUTPUT - name: Detect changed archive file From a9df40a67a95c150f63a8b6669143c3f5b5aa0e6 Mon Sep 17 00:00:00 2001 From: prozolic <42107886+prozolic@users.noreply.github.com> Date: Sat, 14 Feb 2026 12:31:17 +0900 Subject: [PATCH 14/14] Update .github/workflows/create-release.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/create-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 4a0ee3e..69d4bdd 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -32,7 +32,7 @@ jobs: echo "Changed files:" git diff-tree --no-commit-id --name-only -r HEAD - FILE=$(git diff-tree --no-commit-id --name-only -r HEAD | grep "^archives/.*$" | head -n 1) + FILE=$(git diff-tree --no-commit-id --name-only -r HEAD | grep "^archives/.*\.md$" | head -n 1) if [ -z "$FILE" ]; then echo "Error: No archives changes detected"