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