diff --git a/.github/workflows/go.yml b/.github/workflows/build.yml similarity index 79% rename from .github/workflows/go.yml rename to .github/workflows/build.yml index e6acf8d..0d24272 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Go +name: Automated checks on: push: @@ -33,5 +33,9 @@ jobs: - name: Upload coverage report uses: codecov/codecov-action@v1.0.2 with: + token: ${{ secrets.CODECOV_TOKEN }} file: ./coverage.txt flags: unittests + + - name: Build the Docker image + run: docker build . --file Dockerfile --tag encarne:$(date +%s) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml deleted file mode 100644 index 1e68c09..0000000 --- a/.github/workflows/docker-image.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Docker Image CI - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - name: Build the Docker image - run: docker build . --file Dockerfile --tag encarne:$(date +%s) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e3ddc2f..aaf9cff 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -77,6 +77,9 @@ jobs: replace: ${{ github.ref_name }} include: "taurus/setup.py" + - name: Install deps + run: pip install build twine + - name: Build package run: cd taurus && python -m build && twine check dist/* @@ -88,13 +91,27 @@ jobs: password: ${{ secrets.PYPI_API_TOKEN }} docker: - name: Generate cross-platform builds + name: Docker Image runs-on: ubuntu-latest steps: - name: Checkout the repository uses: actions/checkout@v3.0.2 - - name: Inject version + - name: Inject version 1 + uses: jacobtomlinson/gha-find-replace@v2 + with: + find: '"0.0"' + replace: ${{ github.ref_name }} + include: "taurus/encarno/__init__.py" + + - name: Inject version 2 + uses: jacobtomlinson/gha-find-replace@v2 + with: + find: '"0.0"' + replace: ${{ github.ref_name }} + include: "taurus/setup.py" + + - name: Inject version 3 uses: jacobtomlinson/gha-find-replace@v2 with: find: '0.0'