Skip to content
Merged

dev #172

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions .github/workflows/auto-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: write

outputs:
draft_tag: ${{ steps.release_step.outputs.draft_tag }}
steps:
- uses: actions/create-github-app-token@v1
id: app-token
Expand Down Expand Up @@ -62,4 +63,13 @@ jobs:

- name: Log draft release tag
run: |
echo "The temporary draft release tag is: ${{ steps.release_step.outputs.draft_tag }}"
echo "The temporary draft release tag is: ${{ steps.release_step.outputs.draft_tag }}"

- name: Write draft tag to file
run: echo "${{ steps.release_step.outputs.draft_tag }}" > draft_tag.txt

- name: Save draft tag artifact
uses: actions/upload-artifact@v3
with:
name: draft_tag
path: draft_tag.txt
38 changes: 28 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,28 @@
- "!*-*"

permissions:
contents: read

Check warning on line 10 in .github/workflows/release.yml

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Move this read permission from workflow level to job level.

See more on https://sonarcloud.io/project/issues?id=Portabase_portabase&issues=AZzCwHoLhgA_KbzeXbwW&open=AZzCwHoLhgA_KbzeXbwW&pullRequest=172
packages: write

jobs:


log-draft-tag:
runs-on: ubuntu-latest
steps:
- name: Download draft tag artifact
uses: actions/download-artifact@v3
with:
name: draft_tag
path: .

- name: Read draft tag
id: draft
run: |
DRAFT_TAG=$(cat draft_tag.txt)
echo $DRAFT_TAG
echo "draft_tag=$DRAFT_TAG" >> $GITHUB_OUTPUT

docker_publish:
uses: ./.github/workflows/docker.yml
with:
Expand All @@ -22,16 +40,16 @@
needs: docker_publish
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Publish GitHub Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release edit v${{ github.ref_name }} --draft=false
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Publish GitHub Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release edit v${{ github.ref_name }} --draft=false

discord_notification:
needs: docker_publish
Expand Down
Loading