feat: Add Gitea workflow to build and release the Firefox extension.
This commit is contained in:
@@ -17,7 +17,7 @@ jobs:
|
||||
image: node:20-alpine
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: apk add --no-cache zip jq git
|
||||
run: apk add --no-cache zip jq git curl
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
@@ -51,11 +51,11 @@ jobs:
|
||||
cp build/container-bookmarks-${{ steps.version.outputs.version }}.xpi \
|
||||
build/container-bookmarks-${{ steps.version.outputs.version }}.zip
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: container-bookmarks-${{ steps.version.outputs.version }}
|
||||
path: build/*.xpi
|
||||
- name: Upload to Gitea Packages
|
||||
run: |
|
||||
curl --fail --user "${GITHUB_ACTOR}:${{ secrets.GITHUB_TOKEN }}" \
|
||||
--upload-file "build/container-bookmarks-${{ steps.version.outputs.version }}.xpi" \
|
||||
"${GITHUB_SERVER_URL}/api/packages/${GITHUB_REPOSITORY_OWNER}/generic/container-bookmarks/${{ steps.version.outputs.version }}/container-bookmarks-${{ steps.version.outputs.version }}.xpi"
|
||||
|
||||
release:
|
||||
runs-on: docker
|
||||
@@ -65,7 +65,8 @@ jobs:
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: apk add --no-cache jq git
|
||||
run: apk add --no-cache jq git curl
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
@@ -75,11 +76,11 @@ jobs:
|
||||
VERSION=$(jq -r '.version' manifest.json)
|
||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Download artifact
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: container-bookmarks-${{ steps.version.outputs.version }}
|
||||
path: build/
|
||||
- name: Download from Gitea Packages
|
||||
run: |
|
||||
mkdir -p build
|
||||
curl --fail -o "build/container-bookmarks-${{ steps.version.outputs.version }}.xpi" \
|
||||
"${GITHUB_SERVER_URL}/api/packages/${GITHUB_REPOSITORY_OWNER}/generic/container-bookmarks/${{ steps.version.outputs.version }}/container-bookmarks-${{ steps.version.outputs.version }}.xpi"
|
||||
|
||||
- name: Create Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
|
||||
Reference in New Issue
Block a user