fix(publish): touch up npm/cargo publish workflow (#416) [version updates]

* skip yarn audit if current package is latest

* escape backticks

* escape backticks
This commit is contained in:
Jacob Bolda 2020-02-10 08:05:36 -06:00 committed by GitHub
parent c4810ff195
commit 3e7af3df4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 7 deletions

View File

@ -73,17 +73,17 @@ jobs:
run: |
cargo install cargo-audit
echo "# Cargo Audit" | tee -a ${{runner.workspace }}/notes.md
echo "```" >> ${{runner.workspace }}/notes.md
echo "\`\`\`" >> ${{runner.workspace }}/notes.md
cargo audit 2>&1 | tee -a ${{runner.workspace }}/notes.md
echo "```" >> ${{runner.workspace }}/notes.md
echo "\`\`\`" >> ${{runner.workspace }}/notes.md
- name: Publish ${{ matrix.package.name }}
if: env.PACKAGE_VERSION != env.PUBLISHED_VERSION
working-directory: ${{ matrix.package.path }}
run: |
echo "# Cargo Publish" | tee -a ${{runner.workspace }}/notes.md
echo "```" >> ${{runner.workspace }}/notes.md
echo "\`\`\`" >> ${{runner.workspace }}/notes.md
cargo publish --no-verify 2>&1 | tee -a ${{runner.workspace }}/notes.md
echo "```" >> ${{runner.workspace }}/notes.md
echo "\`\`\`" >> ${{runner.workspace }}/notes.md
- name: Create Release
id: create_crate_release
if: env.PACKAGE_VERSION != env.PUBLISHED_VERSION

View File

@ -46,11 +46,14 @@ jobs:
echo "This is current latest:" $PUBLISHED_VERSION
echo "post pack dir:"
ls
- name: npm audit
- name: yarn audit
if: env.PACKAGE_VERSION != env.PUBLISHED_VERSION
working-directory: ${{ matrix.package.path }}
run: |
echo "# NPM Audit Results" | tee -a ${{runner.workspace }}/notes.md
echo "# Yarn Audit Results" | tee -a ${{runner.workspace }}/notes.md
echo "\`\`\`" >> ${{runner.workspace }}/notes.md
yarn audit 2>&1 | tee -a ${{runner.workspace }}/notes.md
echo "\`\`\`" >> ${{runner.workspace }}/notes.md
- name: Publish ${{ matrix.package.name }}
if: env.PACKAGE_VERSION != env.PUBLISHED_VERSION
working-directory: ${{ matrix.package.path }}
@ -58,7 +61,9 @@ jobs:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
echo "# NPM Package Publish" | tee -a ${{runner.workspace }}/notes.md
echo "\`\`\`" >> ${{runner.workspace }}/notes.md
npm publish 2>&1 | tee -a ${{runner.workspace }}/notes.md
echo "\`\`\`" >> ${{runner.workspace }}/notes.md
- name: Create Release
id: create_npm_release
if: env.PACKAGE_VERSION != env.PUBLISHED_VERSION
@ -91,4 +96,4 @@ jobs:
IOTA_SEED: ${{ secrets.IOTA_SEED }}
with:
tag_name: ${{ matrix.package.name }}-v${{ env.PACKAGE_VERSION }}
comment: "[Test] Release ${{ matrix.package.name }} v${{ env.PACKAGE_VERSION }} [npmjs.com]"
comment: "Release ${{ matrix.package.name }} v${{ env.PACKAGE_VERSION }} [npmjs.com]"