From 152e756cfa6e83e13d7c458f93b10d10b3bd2f21 Mon Sep 17 00:00:00 2001 From: Noritaka IZUMI Date: Mon, 4 Nov 2024 13:02:46 +0900 Subject: [PATCH] ci: create-new-release.yml - build and transfer artifact to the job "create-release" --- .github/workflows/create-new-release.yml | 36 +++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/.github/workflows/create-new-release.yml b/.github/workflows/create-new-release.yml index e73598e..81bc37c 100644 --- a/.github/workflows/create-new-release.yml +++ b/.github/workflows/create-new-release.yml @@ -37,16 +37,50 @@ jobs: git push origin ${tag} echo "value=${tag}" >> $GITHUB_OUTPUT + test: + uses: ./.github/workflows/test.yml + + build-package: + runs-on: ubuntu-latest + needs: + - test + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install Hatch + uses: pypa/hatch@install + + - name: Build Package + run: hatch build -c + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + path: 'dist/*' + create-release: name: Create a release runs-on: ubuntu-latest - needs: push-tag + needs: + - push-tag + - build-package permissions: contents: write steps: - name: Checkout repository uses: actions/checkout@v4 + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + path: dist + + - name: List dist directory + run: | + ls -la dist + exit 1 + - name: Create a release uses: softprops/action-gh-release@v2 with: