Skip to content

(#2) Add Exponential Time Wait For Save Downlaod #65

(#2) Add Exponential Time Wait For Save Downlaod

(#2) Add Exponential Time Wait For Save Downlaod #65

Workflow file for this run

name: Publish
on:
push:
tags:
- 'v*'
jobs:
build:
uses: ./.github/workflows/check-test-build.yml
publish:
needs:
- build
permissions:
id-token: write
runs-on: ubuntu-latest
steps:
- name: Download dist
uses: actions/download-artifact@v3
with:
name: dist
path: dist/
- name: Publish to pypi
uses: pypa/gh-action-pypi-publish@release/v1
if: startsWith(github.ref, 'refs/tags')
with:
password: ${{ secrets.PYPI_API_TOKEN }}
release:
needs:
- build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download dist
uses: actions/download-artifact@v3
with:
name: dist
path: dist/
- name: Download Linux executable
uses: actions/download-artifact@v3
with:
name: linux_executable
path: dist/
- name: Download Windows executable
uses: actions/download-artifact@v3
with:
name: windows_executable
path: dist/
- name: Release
uses: softprops/action-gh-release@v1
with:
fail_on_unmatched_files: true
files: |
dist/*.whl
dist/scsd_*_linux_amd64
dist/scsd_*_windows_amd64.exe
docker:
needs:
- publish
runs-on: ubuntu-latest
steps:
- name: Install Dependencies
run: |
sudo apt-get install -y jq
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Docker Login
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Docker Metadata
id: meta
uses: docker/metadata-action@v4
with:
images: |
hhhhojeihsu/scsd
- name: Get Tag without v
id: tag_v
run: |
echo 'version=${{ github.ref_name }}' | sed 's/=v/=/g' >> $GITHUB_OUTPUT
- name: Wait until pypi availible
run: sleep 120
- name: Docker Build and Push
uses: docker/build-push-action@v4
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
build-args: |
SCSD_VERSION=${{ steps.tag_v.outputs.version }}