Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
tsotimus committed Feb 12, 2024
1 parent 43122a8 commit ee72a4f
Showing 1 changed file with 28 additions and 27 deletions.
55 changes: 28 additions & 27 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: "Vite Plugin Release"
on:
push:
branches: [main]
branches: [bug/fix-artifact-issue]

jobs:
build_and_test:
Expand All @@ -15,12 +15,12 @@ jobs:
- run: npm ci
- run: npm run build
- name: Archive production artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: package-dist
retention-days: 1
path: |
packages/vite-plugin-posthog/dist
retention-days: 30
path: packages/vite-plugin-posthog/dist
- name: Create env file
run: |
cd apps/example-react
Expand All @@ -35,7 +35,7 @@ jobs:
run: npx playwright install --with-deps chromium
- name: Run Playwright tests
run: npx playwright test
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
Expand All @@ -56,30 +56,31 @@ jobs:
node-version: 20
- run: npm ci
- name: Download production artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: package-dist
path: packages/vite-plugin-posthog/dist
- uses: JS-DevTools/npm-publish@v3
id: publish
with:
token: ${{ secrets.NPM_AUTH_TOKEN }}
package: packages/vite-plugin-posthog

- name: Bump version and push tag
if: ${{ steps.publish.outputs.type }}
id: tag_version
uses: mathieudutour/github-tag-action@v6.1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: v${{steps.publish.outputs.version}}
tag_prefix: vite-plugin-posthog_
# - uses: JS-DevTools/npm-publish@v3
# id: publish
# with:
# token: ${{ secrets.NPM_AUTH_TOKEN }}
# package: packages/vite-plugin-posthog

# - name: Bump version and push tag
# if: ${{ steps.publish.outputs.type }}
# id: tag_version
# uses: mathieudutour/github-tag-action@v6.1
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# custom_tag: v${{steps.publish.outputs.version}}
# tag_prefix: vite-plugin-posthog_

- name: Create a GitHub release
if: ${{ steps.publish.outputs.type }}
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}
generateReleaseNotes: true
# - name: Create a GitHub release
# if: ${{ steps.publish.outputs.type }}
# uses: ncipollo/release-action@v1
# with:
# tag: ${{ steps.tag_version.outputs.new_tag }}
# name: ${{ steps.tag_version.outputs.new_tag }}
# body: ${{ steps.tag_version.outputs.changelog }}
# generateReleaseNotes: true

0 comments on commit ee72a4f

Please sign in to comment.