Skip to content
Merged
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
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:

- name: Get application token
id: get_token
uses: peter-murray/workflow-application-token-action@8e1ba3bf1619726336414f1014e37f17fbadf1db # v2.1.0
uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
with:
application_id: ${{ secrets.CI_APP_ID }}
application_private_key: ${{ secrets.CI_APP_PRIVATE_KEY }}
app-id: ${{ secrets.CI_APP_ID }}
private-key: ${{ secrets.CI_APP_PRIVATE_KEY }}

- name: Get version
id: version
Expand Down
22 changes: 15 additions & 7 deletions .github/workflows/tag_and_create_release.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Tag and Create Github Release

# ignore: RiskyTriggers
on:
push:
branches: [main]
Expand All @@ -13,18 +14,22 @@ jobs:
steps:
- name: Get application token
id: get_token
uses: peter-murray/workflow-application-token-action@8e1ba3bf1619726336414f1014e37f17fbadf1db # v2.1.0
uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
with:
application_id: ${{ secrets.CI_APP_ID }}
application_private_key: ${{ secrets.CI_APP_PRIVATE_KEY }}
app-id: ${{ secrets.CI_APP_ID }}
private-key: ${{ secrets.CI_APP_PRIVATE_KEY }}

- name: Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
with:
token: ${{ steps.get_token.outputs.token }}

- name: Setup dart
uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f # v1.5.0

- name: Setup cider
run: dart pub global activate cider

- name: Get Latest Release
id: latest-release
uses: pozetroninc/github-action-get-latest-release@d1dafdb6e338bdab109e6afce581a01858680dfb # v0.7.0
Expand All @@ -33,6 +38,7 @@ jobs:
repo: charlatan
excludes: prerelease, draft
token: ${{ github.token }}

- name: Check if should release
id: should-release
run: |
Expand All @@ -42,18 +48,20 @@ jobs:
echo "current version is $curr_version"
echo "previous version is $prev_version"
if [ "$curr_version" = "$prev_version" ]; then
echo "should-release=false" >> $GITHUB_OUTPUT
echo "should-release=false" >> "$GITHUB_OUTPUT"
else
echo "should-release=true" >> $GITHUB_OUTPUT
echo "curr-version=$curr_version" >> $GITHUB_OUTPUT
echo "should-release=true" >> "$GITHUB_OUTPUT"
echo "curr-version=$curr_version" >> "$GITHUB_OUTPUT"
fi

- name: Create tag
if: ${{ steps.should-release.outputs.should-release }}
run: |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git tag -fa ${{ steps.should-release.outputs.curr-version }} -m "release ${{ steps.should-release.outputs.curr-version }}"
git tag -fa "${{ steps.should-release.outputs.curr-version }}" -m "release ${{ steps.should-release.outputs.curr-version }}"
git push -f --tags

- name: Create release
if: ${{ steps.should-release.outputs.should-release }}
uses: ncipollo/release-action@18eadf9c9b0f226f47f164f5373c6a44f0aae169 # v1.11.2
Expand Down
Loading