Skip to content

Commit

Permalink
fix github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
thomassth committed Aug 2, 2024
1 parent b21ffc1 commit f502e4c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 17 deletions.
22 changes: 13 additions & 9 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,19 @@ jobs:
run: |
sed -i "0,/\#\# \[.*/s//## [${{steps.changelog_reader.outputs.version}}-$GITHUB_RUN_ID]/" CHANGELOG.md
cat CHANGELOG.md
- name: Setup credentials
run: |
cat <<EOF > $PUB_CACHE/credentials.json
${{ secrets.CREDENTIALS }}
EOF
- name: Publish package
run: flutter pub publish --force
outputs:
version: ${{steps.changelog_reader.outputs.version}}-$GITHUB_RUN_ID
publish:
needs: prerelease
permissions:
id-token: write # Required for authentication using OIDC
uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1
entry:
needs: [prerelease, publish]
runs-on: ubuntu-latest
steps:
- name: Add entry to Github release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.changelog_reader.outputs.version }}+${{ github.run_id }}
prerelease: true
tag_name: ${{ needs.prerelease.outputs.version }}
prerelease: true
18 changes: 10 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,20 @@ jobs:
channel: "stable"
- run: dart --version
- run: flutter --version
- name: Setup credentials
run: |
cat <<EOF > $PUB_CACHE/credentials.json
${{ secrets.CREDENTIALS }}
EOF
- name: Publish package
run: flutter pub publish --force
publish:
needs: release
permissions:
id-token: write # Required for authentication using OIDC
uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1
entry:
needs: [release, publish]
runs-on: ubuntu-latest
steps:
- name: Get Changelog Entry
id: changelog_reader
uses: mindsers/[email protected]
- name: Add entry to Github release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.changelog_reader.outputs.version }}
body: ${{ steps.changelog_reader.outputs.changes }}
body: ${{ steps.changelog_reader.outputs.changes }}

0 comments on commit f502e4c

Please sign in to comment.