Skip to content

Commit

Permalink
chore(GHA): gh release should no longer create main tag
Browse files Browse the repository at this point in the history
  • Loading branch information
kierun committed Feb 27, 2024
1 parent 2316f38 commit 8a561e0
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions .github/workflows/on-release-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,21 @@ jobs:
runs-on: ubuntu-latest
concurrency: publish
steps:
- name: 'Check out'
- name: Check out
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up the environment
uses: ./.github/workflows/setup-poetry-env

- name: 'Install Task'
- name: Install Task
uses: arduino/setup-task@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x

- name: 'Get latest changes from release step'
- name: Get latest changes from release step
run: |
git pull
Expand All @@ -56,32 +56,41 @@ jobs:
source .venv/bin/activate
poetry build --verbose
- name: Set env for tag
run: |
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Testing tag env
run: |
echo $RELEASE_VERSION
echo ${{ env.RELEASE_VERSION }}
- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
gh release create '${{ github.ref_name }}' --repo '${{ github.repository }}' --notes "GHA created"
gh release create '${{ env.RELEASE_VERSION }}' --repo '${{ github.repository }}' --notes "GHA created"
- name: Upload artifact signatures to GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
gh release upload '${{ github.ref_name }}' dist/** --repo '${{ github.repository }}'
gh release upload '${{ env.RELEASE_VERSION }}' dist/** --repo '${{ github.repository }}'
- name: 'Poetry publish to TEST PyPi'
- name: Poetry publish to TEST PyPi
run: |
source .venv/bin/activate
poetry config repositories.test-pypi https://test.pypi.org/legacy/
poetry config pypi-token.test-pypi ${{ secrets.TEST_PYPI_API_TOKEN }}
poetry publish --verbose -r test-pypi
- name: 'Poetry dry run publish to PyPi'
- name: Poetry dry run publish to PyPi
run: |
source .venv/bin/activate
poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }}
poetry publish --verbose --dry-run
- name: 'Poetry publish to PyPi'
- name: Poetry publish to PyPi
run: |
source .venv/bin/activate
poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }}
Expand Down

0 comments on commit 8a561e0

Please sign in to comment.