Skip to content

Commit

Permalink
move to vars
Browse files Browse the repository at this point in the history
  • Loading branch information
y-chan committed Jul 15, 2024
1 parent f11af1a commit d4ebc22
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,13 @@ jobs:
- config
- check
steps:
- name: Define package name
id: vars
run: |
set -eux
PACKAGE_NAME=$(cat pyproject.toml | grep -xoE "name = \"(.*?)\"" | sed -r 's/name = "(.*?)"/\1/')
echo "package_name=${PACKAGE_NAME}_${{ needs.config.outputs.version_or_latest }}" >> "$GITHUB_OUTPUT"
- name: Check out the repository
uses: actions/checkout@v4

Expand All @@ -94,17 +101,10 @@ jobs:
set -eux
sed -i "s/version = "999.999.999"/version = \"${{ needs.config.outputs.version_or_latest }}\"/" pyproject.toml
- name: Extract package name
id: package_name
run: |
set -eux
PACKAGE_NAME=$(cat pyproject.toml | grep -xoE "name = \"(.*?)\"" | sed -r 's/name = "(.*?)"/\1/')
echo "package_name=${PACKAGE_NAME}_${{ needs.config.outputs.version_or_latest }}" >> "$GITHUB_OUTPUT"
- name: Packaging
run: |
set -eux
zip -r "${{ steps.package_name.output.package_name }}.zip" src/
zip -r "${{ steps.vars.output.package_name }}.zip" src/
- name: Create release
if: needs.config.outputs.version != ''
Expand All @@ -115,6 +115,6 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ needs.config.outputs.version }}
artifacts: >
${{ steps.package_name.output.package_name }}.zip
${{ steps.vars.output.package_name }}.zip
commit: ${{ github.sha }}
body: ${{ steps.tag_version.outputs.changelog }}

0 comments on commit d4ebc22

Please sign in to comment.