Skip to content

Commit

Permalink
ci: create-new-release.yml - build and transfer artifact to the job "…
Browse files Browse the repository at this point in the history
…create-release"
  • Loading branch information
noritakaIzumi committed Nov 4, 2024
1 parent b9d3699 commit 152e756
Showing 1 changed file with 35 additions and 1 deletion.
36 changes: 35 additions & 1 deletion .github/workflows/create-new-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 152e756

Please sign in to comment.