Skip to content

Commit f32a5d4

Browse files
committed
fix(ci): remove yarn reference
1 parent 0c2a6c2 commit f32a5d4

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

.github/workflows/publish.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -92,19 +92,19 @@ jobs:
9292
pnpm run release:changelog
9393
9494
- name: Fetch latest tag
95-
if: ${{ github.event.inputs.tag-name == '' }}
95+
if: ${{ inputs.tag-name == '' }}
9696
id: latest-tag
9797
run: |
9898
# ================= Fetch tag =================
9999
100-
tag_name=$(git describe --abbrev=0)
100+
tag_name=$(git describe --abbrev=0 --match 'v*')
101101
echo "Tag found: '\e[34m$tag_name\e[0m'"
102102
echo "TAG_NAME=$tag_name" >> "$GITHUB_OUTPUT"
103103
104104
- name: Push Release to github
105105
uses: softprops/action-gh-release@v1
106106
with:
107-
tag_name: ${{ github.event.inputs.tag-name || steps.latest-tag.outputs.TAG_NAME }}
107+
tag_name: ${{ inputs.tag-name || steps.latest-tag.outputs.TAG_NAME }}
108108
body_path: RELEASE.md
109109
files: dist/trakt-extension.zip
110110

@@ -118,5 +118,5 @@ jobs:
118118
# ================= Publish to Chrome store =================
119119
120120
# Uploading zip to web store
121-
yarn dlx -q chrome-webstore-upload-cli upload --source dist/trakt-extension.zip --extension-id "$CHROME_WEB_STORE_EXTENSION_ID" --client-id "$CHROME_WEB_STORE_CLIENT_ID" --client-secret "$CHROME_WEB_STORE_CLIENT_SECRET" --refresh-token "$CHROME_WEB_STORE_REFRESH_TOKEN"
121+
npx -s chrome-webstore-upload-cli upload --source dist/trakt-extension.zip --extension-id "$CHROME_WEB_STORE_EXTENSION_ID" --client-id "$CHROME_WEB_STORE_CLIENT_ID" --client-secret "$CHROME_WEB_STORE_CLIENT_SECRET" --refresh-token "$CHROME_WEB_STORE_REFRESH_TOKEN"
122122

.github/workflows/release.yml

+10-2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ jobs:
2828
name: Tag and release commit
2929
runs-on: ubuntu-latest
3030

31+
outputs:
32+
tag-name: ${{ steps.push-tag.outputs.tag_name }}
33+
3134
steps:
3235
- name: Checkout branch ${{ github.ref }}
3336
uses: actions/checkout@v3
@@ -62,9 +65,10 @@ jobs:
6265
git config user.email "<>"
6366
6467
# generate release
65-
yarn release
68+
pnpm run release
6669
6770
- name: Push to remote
71+
id: push-tag
6872
run: |
6973
# ================= Remote =================
7074
@@ -74,14 +78,18 @@ jobs:
7478
7579
# push changes
7680
git push origin --follow-tags
81+
82+
tag_name=$(git describe --abbrev=0 --match 'v*')
83+
84+
echo "tag_name=$tag_name" >> "$GITHUB_OUTPUT"
7785
7886
publish:
7987
name: Publish
8088
needs: release
8189
uses: ./.github/workflows/publish.yml
8290
secrets: inherit
8391
with:
84-
tag-name: ${{ inputs.tag-name }}
92+
tag-name: ${{ inputs.tag-name || needs.release.outputs.tag-name }}
8593
skip-npm: ${{ inputs.skip-npm }}
8694

8795
deploy:

0 commit comments

Comments
 (0)