Skip to content

Commit

Permalink
ci: move publish step to configure file
Browse files Browse the repository at this point in the history
  • Loading branch information
aquino-mael committed Oct 29, 2024
1 parent e6ff80c commit ad71b31
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 81 deletions.
39 changes: 0 additions & 39 deletions .github/workflows/realtime-publish.ci.yml

This file was deleted.

35 changes: 34 additions & 1 deletion .github/workflows/realtime.ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Realtime - Configure package
name: Realtime - Configure and publish package

on:
push:
Expand Down Expand Up @@ -35,3 +35,36 @@ jobs:
npx semantic-release
env:
GITHUB_TOKEN: ${{ github.token }}

publish:
needs: configure-superviz-realtime
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/realtime
steps:
# Checkout repository
- uses: actions/checkout@v4

- run: git pull

# Setup Dart SDK
- name: Setup Dart SDK
uses: dart-lang/setup-dart@v1
with:
sdk: stable

# Minimal package setup and dry run checks.
- name: Install dependencies
run: dart pub get

- name: Publish - dry run
run: dart pub publish --dry-run

- name: Publish to pub.dev
run: dart pub publish -f
39 changes: 0 additions & 39 deletions .github/workflows/socket-client-publish.ci.yml

This file was deleted.

36 changes: 34 additions & 2 deletions .github/workflows/socket-client.ci.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
name: Socket client - Configure package
name: Socket client - Configure and publish package

on:
push:
branches: ["master"]
paths:
- "packages/socket-client/**"
- ".github/workflows/socket-client.ci.yml"
- ".github/workflows/socket-client-publish.ci.yml"

jobs:
configure_superviz_socket_client:
Expand Down Expand Up @@ -36,3 +35,36 @@ jobs:
npx semantic-release
env:
GITHUB_TOKEN: ${{ github.token }}

publish:
needs: configure_superviz_socket_client
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/socket-client
steps:
# Checkout repository
- uses: actions/checkout@v4

- run: git pull

# Setup Dart SDK
- name: Setup Dart SDK
uses: dart-lang/setup-dart@v1
with:
sdk: stable

# Minimal package setup and dry run checks.
- name: Install dependencies
run: dart pub get

- name: Publish - dry run
run: dart pub publish --dry-run

- name: Publish to pub.dev
run: dart pub publish -f

0 comments on commit ad71b31

Please sign in to comment.