From 7f16f4e6d76e9dffba2322c4fe0e6f576d5b6579 Mon Sep 17 00:00:00 2001 From: Joseph Manley Date: Thu, 4 Feb 2021 21:32:40 -0500 Subject: [PATCH] Update release pipeline Fix versioning Fix artifact name Use artifact value as input fix output name Update workflows --- .github/workflows/build.yaml | 2 +- .github/workflows/release.yaml | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c4f5d40..c35689b 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -2,7 +2,7 @@ name: Build on: push jobs: - release: + build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index bc4d3be..5e0ad90 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -15,7 +15,8 @@ jobs: python-version: 3.9 - name: Update Version run: | - sed -i "s/[0-9.]*\.[0-9.]*\.[0-9.]*/${GITHUB_REF}/g" jira_tracker/__init__.py + echo "Setting version to: ${GITHUB_REF:10}" + sed -i "s/[0-9.]*\.[0-9.]*\.[0-9.]*/${GITHUB_REF:10}/g" jira_tracker/__init__.py - name: Install dependencies run: | python -m pip install --upgrade pip @@ -38,17 +39,20 @@ jobs: python-version: 3.9 - name: Update Version run: | - sed -i "s/[0-9.]*\.[0-9.]*\.[0-9.]*/${GITHUB_REF}/g" jira_tracker/__init__.py + echo "Setting version to: ${GITHUB_REF:10}" + sed -i "s/[0-9.]*\.[0-9.]*\.[0-9.]*/${GITHUB_REF:10}/g" jira_tracker/__init__.py - name: Install dependencies run: | python -m pip install --upgrade pip pip install -r requirements.txt - name: Build + id: build run: | python setup.py sdist + echo "::set-output name=artifact::dist/jira-tracker-${GITHUB_REF:10}.tar.gz" - name: Upload to release uses: JasonEtco/upload-to-release@v0.1.1 with: - args: dist/jira-tracker-*.tar.gz + args: ${{ steps.build.outputs.artifact }} application/tar+gzip env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file