Skip to content

Commit

Permalink
🔖 release 6.1.2 (2nd attempt) (#420)
Browse files Browse the repository at this point in the history
  • Loading branch information
techouse authored May 14, 2023
1 parent bea6840 commit 030e833
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 30 deletions.
63 changes: 38 additions & 25 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,58 @@ name: Publish packages

on:
push:
branches: ['master']
branches:
- master
defaults:
run:
shell: bash
env:
PUB_ENVIRONMENT: bot.github
permissions: read-all

jobs:
publish_chopper:
name: "Publish chopper"
runs-on: ubuntu-latest
steps:
- uses: dart-lang/setup-dart@v1.3
name: "Publish chopper"
runs-on: ubuntu-latest
steps:
- uses: dart-lang/setup-dart@v1
with:
sdk: stable
- id: checkout
uses: actions/checkout@v3
- id: credentials
run: |
mkdir -p $XDG_CONFIG_HOME/dart
echo '${{ secrets.PUB_CREDENTIALS }}' > "$XDG_CONFIG_HOME/dart/pub-credentials.json"
- id: publish
run: bash tool/publish.sh chopper
env:
CREDENTIAL_JSON: ${{ secrets.CREDENTIAL_JSON }}
publish_chopper_generator:
name: "Publish chopper_generator"
runs-on: ubuntu-latest
steps:
- uses: dart-lang/setup-dart@v1.3
with:
sdk: stable
- id: checkout
uses: actions/checkout@v3
- id: publish
run: bash tool/publish.sh chopper_generator
env:
CREDENTIAL_JSON: ${{ secrets.CREDENTIAL_JSON }}
- uses: dart-lang/setup-dart@v1
with:
sdk: stable
- id: checkout
uses: actions/checkout@v3
- id: credentials
run: |
mkdir -p $XDG_CONFIG_HOME/dart
echo '${{ secrets.PUB_CREDENTIALS }}' > "$XDG_CONFIG_HOME/dart/pub-credentials.json"
- id: publish
run: bash tool/publish.sh chopper_generator
publish_chopper_built_value:
name: "Publish chopper_built_value"
runs-on: ubuntu-latest
steps:
- uses: dart-lang/setup-dart@v1.3
with:
sdk: stable
- id: checkout
uses: actions/checkout@v3
- id: publish
run: bash tool/publish.sh chopper_built_value
env:
CREDENTIAL_JSON: ${{ secrets.CREDENTIAL_JSON }}
- uses: dart-lang/setup-dart@v1
with:
sdk: stable
- id: checkout
uses: actions/checkout@v3
- id: credentials
run: |
mkdir -p $XDG_CONFIG_HOME/dart
echo '${{ secrets.PUB_CREDENTIALS }}' > "$XDG_CONFIG_HOME/dart/pub-credentials.json"
- id: publish
run: bash tool/publish.sh chopper_built_value
47 changes: 47 additions & 0 deletions .github/workflows/publish_dry_run.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Publish packages (dry run)

on:
pull_request:
branches:
- master
defaults:
run:
shell: bash
env:
PUB_ENVIRONMENT: bot.github
permissions: read-all

jobs:
publish_chopper:
name: "Publish chopper (dry run)"
runs-on: ubuntu-latest
steps:
- uses: dart-lang/setup-dart@v1
with:
sdk: stable
- id: checkout
uses: actions/checkout@v3
- id: publish_dry_run
run: bash tool/publish.sh chopper --dry-run
publish_chopper_generator:
name: "Publish chopper_generator (dry run)"
runs-on: ubuntu-latest
steps:
- uses: dart-lang/setup-dart@v1
with:
sdk: stable
- id: checkout
uses: actions/checkout@v3
- id: publish_dry_run
run: bash tool/publish.sh chopper_generator --dry-run
publish_chopper_built_value:
name: "Publish chopper_built_value (dry run)"
runs-on: ubuntu-latest
steps:
- uses: dart-lang/setup-dart@v1
with:
sdk: stable
- id: checkout
uses: actions/checkout@v3
- id: publish_dry_run
run: bash tool/publish.sh chopper_built_value --dry-run
Binary file removed chopper/.DS_Store
Binary file not shown.
11 changes: 6 additions & 5 deletions tool/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ PKG=$1
echo -e "\033[1mPKG: ${PKG}\033[22m"
pushd "${PKG}"

mkdir -p ~/.pub-cache

echo $CREDENTIAL_JSON > ~/.pub-cache/credentials.json

sed '/Comment before publish$/,+2 d' pubspec.yaml > pubspec.temp.yaml
rm pubspec.yaml
mv pubspec.temp.yaml pubspec.yaml

dart pub publish -f
if [ "$2" == "--dry-run" ]; then
dart pub publish --dry-run
else
dart pub publish --force
fi

popd

0 comments on commit 030e833

Please sign in to comment.