Skip to content

Commit

Permalink
Merge pull request #112 from xmtp/daniel-dart-pub-release
Browse files Browse the repository at this point in the history
build: publish dart on release, fix semver for kt and dart
  • Loading branch information
dmccartney authored Oct 25, 2023
2 parents 9017c78 + 22f879b commit de642c2
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 36 deletions.
36 changes: 0 additions & 36 deletions .github/workflows/publish-dart.yml

This file was deleted.

32 changes: 32 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,39 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm run semantic-release
dart:
# The `semantic-release` from JS calculates the version tag
needs: js
if: ${{ github.ref_name == 'main' }}
name: Release (dart)
# https://dart.dev/tools/pub/automated-publishing
permissions:
id-token: write # This is required for requesting the JWT
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46
- run: dart pub get
working-directory: ./dart
- run: dev/dart/generate
- run: dart test
working-directory: ./dart
- name: Set Tag
run: |
TAG=`echo $(git describe --tags --abbrev=0)`
echo "GIT_TAG=${TAG#v}" >> $GITHUB_ENV
- run: dev/dart/prepublish
env:
RELEASE_VERSION: ${{ env.GIT_TAG }}
- name: Verify pubspec
run: cat ./dart/pubspec.yaml
- run: dart pub publish --force
working-directory: ./dart
kotlin:
# The `semantic-release` from JS calculates the version tag
needs: js
if: ${{ github.ref_name == 'main' }}
name: Release (Kotlin)
runs-on: ubuntu-latest
Expand Down

0 comments on commit de642c2

Please sign in to comment.