Skip to content

Commit

Permalink
Attempt to make actions work.
Browse files Browse the repository at this point in the history
  • Loading branch information
somespecialone committed Nov 17, 2023
1 parent 3e75987 commit 7fe2a78
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Publish

on:
workflow_run:
workflows: [ Release ]
types: [ completed ]

release:
types: [ published ]

Expand All @@ -9,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
outputs:
dist-file: ${{ steps.pack.outputs.dist-file }}
dist_file: ${{ steps.pack.outputs.tar }}
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
Expand All @@ -27,13 +31,13 @@ jobs:
working-directory: lib
run: |
pnpm pack
echo "dist-file=$(find -name '*.tgz')" >> $GITHUB_OUTPUT
echo "tar=$(find -name '*.tgz')" >> $GITHUB_OUTPUT
cp *.tgz ..
- uses: actions/upload-artifact@v3
with:
name: package-dist
path: ${{ steps.pack.outputs.dist-file }}
path: ${{ steps.pack.outputs.tar }}
retention-days: 1

publish:
Expand All @@ -52,4 +56,4 @@ jobs:
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NODE_AUTH_TOKEN }}
package: ${{ needs.build.outputs.dist-file }}
package: ${{ needs.build.outputs.dist_file }}
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ on:
- v*

jobs:
build:
main:
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: write
steps:
- uses: actions/checkout@v4

# it would be nice to be able to generate change logs there
# it would be nice to be able to generate changelogs there

- name: Create & publish release
uses: softprops/action-gh-release@v1
Expand Down

0 comments on commit 7fe2a78

Please sign in to comment.