Skip to content

Commit

Permalink
fixup not contains syntax in release and test release workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
brainelectronics committed Oct 12, 2024
1 parent 4f052c2 commit eb1c01e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
echo '"EOT"' >> $GITHUB_OUTPUT
echo "latest_version=$(jq -r '.info.version' changelog.json)" >> $GITHUB_ENV
- name: Build package
if: ! ${{ contains(fromJson(env.CHANGELOG_JSON).info.meta.scope, 'internal') }}
if: ${{ !contains(fromJson(env.CHANGELOG_JSON).info.meta.scope, 'internal') }}
run: |
poetry run changelog2version \
--changelog_file changelog.md \
Expand All @@ -61,15 +61,15 @@ jobs:
--debug
poetry build
- name: Publish package
if: ! ${{ contains(fromJson(env.CHANGELOG_JSON).info.meta.scope, 'internal') }}
if: ${{ !contains(fromJson(env.CHANGELOG_JSON).info.meta.scope, 'internal') }}
uses: pypa/gh-action-pypi-publish@release/v1.5
with:
password: ${{ secrets.PYPI_API_TOKEN }}
skip_existing: true
verbose: true
print_hash: true
- name: Create Release
if: ! ${{ contains(fromJson(env.CHANGELOG_JSON).info.meta.scope, 'internal') }}
if: ${{ !contains(fromJson(env.CHANGELOG_JSON).info.meta.scope, 'internal') }}
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
echo '"EOT"' >> $GITHUB_OUTPUT
echo "latest_version=$(jq -r '.info.version' changelog.json)" >> $GITHUB_ENV
- name: Build package
if: ! ${{ contains(fromJson(env.CHANGELOG_JSON).info.meta.scope, 'internal') }}
if: ${{ !contains(fromJson(env.CHANGELOG_JSON).info.meta.scope, 'internal') }}
run: |
poetry run changelog2version \
--changelog_file changelog.md \
Expand All @@ -59,11 +59,11 @@ jobs:
--debug
poetry build
- name: Test built package
if: ! ${{ contains(fromJson(env.CHANGELOG_JSON).info.meta.scope, 'internal') }}
if: ${{ !contains(fromJson(env.CHANGELOG_JSON).info.meta.scope, 'internal') }}
run: |
twine check dist/*.tar.gz
- name: Archive build package artifact
if: ! ${{ contains(fromJson(env.CHANGELOG_JSON).info.meta.scope, 'internal') }}
if: ${{ !contains(fromJson(env.CHANGELOG_JSON).info.meta.scope, 'internal') }}
uses: actions/upload-artifact@v4
with:
# https://docs.github.com/en/actions/learn-github-actions/contexts#github-context
Expand All @@ -72,7 +72,7 @@ jobs:
path: dist/*.tar.gz
retention-days: 14
- name: Publish package
if: ! ${{ contains(fromJson(env.CHANGELOG_JSON).info.meta.scope, 'internal') }}
if: ${{ !contains(fromJson(env.CHANGELOG_JSON).info.meta.scope, 'internal') }}
uses: pypa/gh-action-pypi-publish@release/v1.5
with:
repository_url: https://test.pypi.org/legacy/
Expand All @@ -81,7 +81,7 @@ jobs:
verbose: true
print_hash: true
- name: Create Prerelease
if: ! ${{ contains(fromJson(env.CHANGELOG_JSON).info.meta.scope, 'internal') }}
if: ${{ !contains(fromJson(env.CHANGELOG_JSON).info.meta.scope, 'internal') }}
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit eb1c01e

Please sign in to comment.