diff --git a/.github/workflows/cd-linux.yaml b/.github/workflows/cd-linux.yaml index 12d5a210..27484cff 100644 --- a/.github/workflows/cd-linux.yaml +++ b/.github/workflows/cd-linux.yaml @@ -1,27 +1,12 @@ name: Continuous delivery - Linux on: - release: - types: [prereleased, released] + push: env: FLIT_ROOT_INSTALL: 1 jobs: - version-check: - name: Check versioning - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - name: Check version tag format - run: | - TAG_VERSION="${{ github.event.release.tag_name }}" - if [[ $TAG_VERSION =~ ^v[0-9]+.[0-9]+.[0-9]+(-rc\.[1-9])?$ ]]; then exit 0; else exit 1; fi - - name: Check if version tag and package version are equal - run: | - TAG_VERSION="${{ github.event.release.tag_name }}" - if [ ${TAG_VERSION:1} == $(cat pynitrokey/VERSION) ]; then exit 0; else exit 1; fi build-onefile: name: Build onefile runs-on: ubuntu-latest @@ -45,35 +30,3 @@ jobs: . venv/bin/activate pyinstaller \ ci-scripts/linux/pyinstaller/pynitrokey-onefile.spec - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: nitropy-onefile - path: dist/nitropy - publish-binary: - name: Publish binary - runs-on: ubuntu-latest - container: python:3.9-slim - needs: build-onefile - permissions: - contents: write - steps: - - name: Download artifact - uses: actions/download-artifact@v4 - with: - name: nitropy-onefile - - name: Rename binary - run: | - mv \ - nitropy \ - nitropy-${{ github.event.release.tag_name }}-x64-linux-binary - - name: Create archive - run: | - tar \ - -czvf \ - nitropy-${{ github.event.release.tag_name }}-x64-linux-binary.tar.gz \ - nitropy-${{ github.event.release.tag_name }}-x64-linux-binary - - name: Publish release - uses: softprops/action-gh-release@v2 - with: - files: nitropy-${{ github.event.release.tag_name }}-x64-linux-binary.tar.gz diff --git a/.github/workflows/cd-windows.yaml b/.github/workflows/cd-windows.yaml index ecb160b2..ebdb4d03 100644 --- a/.github/workflows/cd-windows.yaml +++ b/.github/workflows/cd-windows.yaml @@ -1,28 +1,12 @@ name: Continuous delivery - Windows on: - release: - types: [prereleased, released] + push: env: FLIT_ROOT_INSTALL: 1 jobs: - version-check: - name: Check versioning - runs-on: windows-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - name: Check version tag format - run: | - $VERSION_TAG="${{ github.event.release.tag_name }}" - if ($VERSION_TAG -match "^v[0-9]+.[0-9]+.[0-9]+(-rc\.[1-9])?$") {exit 0} else {exit 1} - - name: Check if version tag and package version are equal - run: | - $VERSION_TAG="${{ github.event.release.tag_name }}" - $VERSION_FILE=Get-Content .\pynitrokey\VERSION - if ($VERSION_TAG.Substring(1) -eq $VERSION_FILE) {exit 0} else {exit 1} build-onedir: name: Build onedir runs-on: windows-latest @@ -48,11 +32,6 @@ jobs: run: | .\venv\Scripts\Activate.ps1 pyinstaller ci-scripts/windows/pyinstaller/pynitrokey-onedir.spec - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: pynitrokey-onedir - path: dist/nitropy build-onefile: name: Build onefile runs-on: windows-latest @@ -78,11 +57,6 @@ jobs: run: | .\venv\Scripts\Activate.ps1 pyinstaller ci-scripts/windows/pyinstaller/pynitrokey-onefile.spec - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: pynitrokey-onefile - path: dist/nitropy.exe build-msi-installer: name: Build MSI installer runs-on: windows-latest @@ -126,53 +100,3 @@ jobs: .\Product.wixobj ` .\Sources.wixobj ` -o nitropy.msi - - name: Upload artifact - uses: actions/upload-artifact@v4 - with: - name: nitropy-installer - path: nitropy.msi - publish-binary: - name: Publish binary - runs-on: windows-latest - needs: build-onefile - permissions: - contents: write - steps: - - name: Download artifact - uses: actions/download-artifact@v4 - with: - name: pynitrokey-onefile - - name: Rename binary - run: | - mv ` - nitropy.exe ` - nitropy-${{ github.event.release.tag_name }}-x64-windows-binary.exe - - name: Create archive - run: | - 7z a -tzip -mx9 ` - nitropy-${{ github.event.release.tag_name }}-x64-windows-binary.zip ` - nitropy-${{ github.event.release.tag_name }}-x64-windows-binary.exe - - name: Publish release - uses: softprops/action-gh-release@v2 - with: - files: nitropy-${{ github.event.release.tag_name }}-x64-windows-binary.zip - publish-msi-installer: - name: Publish MSI installer - runs-on: windows-latest - needs: build-msi-installer - permissions: - contents: write - steps: - - name: Download artifact - uses: actions/download-artifact@v4 - with: - name: nitropy-installer - - name: Rename installer - run: | - mv ` - nitropy.msi ` - nitropy-${{ github.event.release.tag_name }}-x64-windows-installer.msi - - name: Publish release - uses: softprops/action-gh-release@v2 - with: - files: nitropy-${{ github.event.release.tag_name }}-x64-windows-installer.msi