Skip to content

Commit

Permalink
chore: protect against publishing alpha versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason3S committed Feb 22, 2024
1 parent 738cb79 commit dbf899c
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/manual-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,30 @@ jobs:
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}

- name: Get Package Version
id: version
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
const manifest = JSON.parse(fs.readFileSync('package.json', 'utf8'));
const version = manifest.version;
core.setOutput('version', version);
- name: Display Info
uses: streetsidesoftware/actions/public/output@v1
with:
value: |
# Package Version
ref: ${{ inputs.ref }}
version: `${{ steps.version.outputs.version }}`
- name: Test Exit
run: |
echo "::error title=Test::This is a test error"
exit 1
- name: Install
run: |
npm install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
publish:
needs:
- release-please
if: ${{ needs.release-please.outputs.release_created && !contains('alpha', needs.release-please.outputs.tag_name) }}
if: ${{ needs.release-please.outputs.release_created && !contains(needs.release-please.outputs.tag_name, 'alpha') }}
uses: ./.github/workflows/manual-publish.yml
with:
ref: ${{ needs.release-please.outputs.tag_name }}
Expand Down
4 changes: 3 additions & 1 deletion release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@
}
],
"packages": {
".": {}
".": {
"include-component-in-tag": false
}
}
}

0 comments on commit dbf899c

Please sign in to comment.