Skip to content

Commit

Permalink
Releases for all supported platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjvs committed Sep 14, 2023
1 parent 1b5a306 commit 0e386dc
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@ jobs:
id: package-version
uses: martinbeentjes/npm-get-version-action@main

- name: Install npm packages
run: npm install

- name: Build for cloudflare
run: npm run build:cloudflare && cp ./.output/server/index.mjs ./cloudflare.worker.mjs

- name: Build for AWS
run: npm run build:aws && cd .output/server && zip -r ../../lambda.zip .

- name: Build for Node
run: npm run build:node && cd .output/server && zip -r ../../nodejs.zip .

- name: Create Release
id: create_release
uses: actions/create-release@v1
Expand All @@ -28,3 +40,38 @@ jobs:
release_name: Bot v${{ steps.package-version.outputs.current-version }}
draft: false
prerelease: false
body: |
Instead of downloading a package, you can also run it in docker:
```sh
docker run movie-web/simple-proxy:${{ steps.package-version.outputs.current-version }}
```
- name: Upload cloudflare build
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./cloudflare.worker.mjs
asset_name: simple-proxy-cloudflare.mjs
asset_content_type: text/javascript

- name: Upload AWS build
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./lambda.zip
asset_name: simple-proxy-aws-lambda.zip
asset_content_type: application/zip

- name: Upload Node build
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./node.zip
asset_name: simple-proxy-nodejs.zip
asset_content_type: application/zip

0 comments on commit 0e386dc

Please sign in to comment.