Skip to content

Commit

Permalink
Fix release CI
Browse files Browse the repository at this point in the history
  • Loading branch information
baptistecdr committed Sep 1, 2024
1 parent 529f235 commit 6952f28
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 14 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/node-release-major.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
MAJOR_VERSION=$(npm version --no-git-tag-version --no-commit-hooks major)
node scripts/update-version.js $MAJOR_VERSION
npm install
npm run lint:fix
echo "MAJOR_VERSION=$MAJOR_VERSION" >> $GITHUB_OUTPUT
- name: Commit, push and create tag
uses: EndBug/add-and-commit@v9
Expand All @@ -38,6 +39,7 @@ jobs:
DEV_VERSION=$(npm version --no-git-tag-version --no-commit-hooks --preid SNAPSHOT prerelease)
node scripts/update-version.js $DEV_VERSION
npm install
npm run lint:fix
echo "DEV_VERSION=$DEV_VERSION" >> $GITHUB_OUTPUT
- name: Commit and push
uses: EndBug/add-and-commit@v9
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/node-release-minor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
MINOR_VERSION=$(npm version --no-git-tag-version --no-commit-hooks minor)
node scripts/update-version.js $MINOR_VERSION
npm install
npm run lint:fix
echo "MINOR_VERSION=$MINOR_VERSION" >> $GITHUB_OUTPUT
- name: Commit, push and create tag
uses: EndBug/add-and-commit@v9
Expand All @@ -38,6 +39,7 @@ jobs:
DEV_VERSION=$(npm version --no-git-tag-version --no-commit-hooks --preid SNAPSHOT prerelease)
node scripts/update-version.js $DEV_VERSION
npm install
npm run lint:fix
echo "DEV_VERSION=$DEV_VERSION" >> $GITHUB_OUTPUT
- name: Commit and push
uses: EndBug/add-and-commit@v9
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/node-release-patch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
PATCH_VERSION=$(npm version --no-git-tag-version --no-commit-hooks patch)
node scripts/update-version.js $PATCH_VERSION
npm install
npm run lint:fix
echo "PATCH_VERSION=$PATCH_VERSION" >> $GITHUB_OUTPUT
- name: Commit, push and create tag
uses: EndBug/add-and-commit@v9
Expand All @@ -38,6 +39,7 @@ jobs:
DEV_VERSION=$(npm version --no-git-tag-version --no-commit-hooks --preid SNAPSHOT prerelease)
node scripts/update-version.js $DEV_VERSION
npm install
npm run lint:fix
echo "DEV_VERSION=$DEV_VERSION" >> $GITHUB_OUTPUT
- name: Commit and push
uses: EndBug/add-and-commit@v9
Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,8 @@ jobs:
GH_TOKEN: ${{ github.token }}
run: |
mkdir "$ARTIFACTS_DIR"
gh api -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: $GH_API_VERSION" \
/repos/${{ github.repository }}/actions/artifacts/${{ steps.upload-firefox-artifact.outputs.artifact-id }}/zip > "$ARTIFACTS_DIR/$ARTIFACT_FIREFOX_FILENAME"
gh api -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: $GH_API_VERSION" \
/repos/${{ github.repository }}/actions/artifacts/${{ steps.upload-chromium-artifact.outputs.artifact-id }}/zip > "$ARTIFACTS_DIR/$ARTIFACT_CHROMIUM_FILENAME"
gh api /repos/${{ github.repository }}/actions/artifacts/${{ steps.upload-firefox-artifact.outputs.artifact-id }}/zip > "$ARTIFACTS_DIR/$ARTIFACT_FIREFOX_FILENAME"
gh api /repos/${{ github.repository }}/actions/artifacts/${{ steps.upload-chromium-artifact.outputs.artifact-id }}/zip > "$ARTIFACTS_DIR/$ARTIFACT_CHROMIUM_FILENAME"
- name: Attest artifacts
uses: actions/attest-build-provenance@v1
Expand Down Expand Up @@ -95,27 +93,28 @@ jobs:
run: |
mkdir "$ARTIFACTS_DIR"
gh api /repos/${{ github.repository }}/actions/artifacts/${{ needs.build.outputs.firefox-artifact-id }}/zip > "$ARTIFACTS_DIR/$ARTIFACT_FIREFOX_FILENAME"
gh api /repos/${{ github.repository }}/artifacts/${{ needs.build.outputs.chromium-artifact-id }}/zip > "$ARTIFACTS_DIR/$ARTIFACT_CHROMIUM_FILENAME"
gh api /repos/${{ github.repository }}/actions/artifacts/${{ needs.build.outputs.chromium-artifact-id }}/zip > "$ARTIFACTS_DIR/$ARTIFACT_CHROMIUM_FILENAME"
- name: Verify artifacts
env:
GH_TOKEN: ${{ github.token }}
run: |
gh attestation verify "$ARTIFACTS_DIR/$ARTIFACT_FIREFOX_FILENAME" --repo ${{ github.repository }}
gh attestation verify "$ARTIFACTS_DIR/$ARTIFACT_CHROMIUM_FILENAME" --repo ${{ github.repository }}
- name: Archive repository
run: git archive --format zip --output "$ARTIFACTS_DIR/$ARTIFACT_ARCHIVE_FILENAME" ${{ github.ref_name }}

- name: Release Firefox extension
uses: baptistecdr/release-firefox-addon@v0.2.4
uses: baptistecdr/release-firefox-addon@v1.0.0
if: ${{ vars.RELEASE_FIREFOX_EXTENSION == 'true' }}
with:
addon-id: $FIREFOX_ADDON_ID
addon-id: ${{ env.FIREFOX_ADDON_ID }}
auth-api-issuer: ${{ secrets.MOZILLA_ADDONS_API_KEY }}
auth-api-secret: ${{ secrets.MOZILLA_ADDONS_API_SECRET }}
addon-path: ${{ env.ARTIFACTS_DIR }}/${{ env.ARTIFACT_FIREFOX_FILENAME }}
source-path: ${{ env.ARTIFACTS_DIR }}/${{ env.ARTIFACT_ARCHIVE_FILENAME }}
release-note: 'Release ${{ github.ref_name }}'

- name: Release Microsoft Edge extension
uses: inverse/edge-addon@master
Expand Down
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6952f28

Please sign in to comment.