Skip to content
This repository has been archived by the owner on Oct 27, 2024. It is now read-only.

Commit

Permalink
Fix tag handling
Browse files Browse the repository at this point in the history
  • Loading branch information
exTerEX committed Mar 13, 2022
1 parent 3dbd64a commit 876268d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
latest=true
tags: |
branch=main,value=latest
type=semver,pattern={{version}}
type=pep440,pattern={{version}}
- name: Build and push Docker image
id: build-and-push
Expand Down
22 changes: 18 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,28 @@ jobs:
run: python -m pip install --upgrade pip setuptools wheel

- name: Build wheel of noaa
run: python -m pip wheel --use-pep517 --no-cache-dir .
run: python -m pip wheel --use-pep517 --wheel-dir wheels/ .

- name: Extract Docker metadata
id: meta
uses: docker/[email protected]
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
flavor: |
latest=true
tags: |
type=pep440,pattern={{version}}
- name: Set tag var
id: tag
run: echo ::set-output name=pip_tag::$(echo ${{ steps.meta.outputs.tags }} | awk '{ print substr ($0, 3 ) }')

- name: Upload and attach release asset to draft
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.draft.upload_url }}
asset_path: ./noaa-${{ github.ref }}.post0-py3-none-any.whl
asset_name: noaa-${{ github.ref }}-py3-none-any.whl
upload_url: ${{ needs.draft.outputs.upload_url }}
asset_path: ./wheels/noaa-${{ steps.tag.outputs.pip_tag }}-py3-none-any.whl
asset_name: noaa-${{ steps.tag.outputs.pip_tag }}-py3-none-any.whl
asset_content_type: application/zip

0 comments on commit 876268d

Please sign in to comment.