Fix for #12 - deno encode base64 moved in std lib #119
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
# This workflow will install Deno then run Deno lint and test. | |
# For more information see: https://github.com/denoland/setup-deno | |
name: Deno | |
on: | |
push: | |
tags: | |
- v*.*.* | |
# push: | |
# branches: [chenbishop-patch-1] | |
jobs: | |
build_release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup repo | |
uses: actions/checkout@v1 | |
- name: Setup Deno | |
uses: denoland/setup-deno@v1 | |
with: | |
deno-version: v1.x | |
- id: get_version | |
uses: battila7/get-version-action@v2 | |
# - name: Test Deno | |
# run: deno run https://deno.land/std/examples/welcome.ts | |
- name: Compile | |
run: | | |
sed -i 's/LATEST/${{ steps.get_version.outputs.version-without-v }}/g' ./version.js | |
deno -V | |
deno cache --reload ./tg.js --unstable | |
deno compile --allow-all --import-map ./import_map.json --unstable ./tg.js | |
mkdir -p dist/linux/x86_64 dist/win/x86_64 dist/macos/x86_64 dist/macos/aarch64 | |
deno bundle --unstable --import-map ./import_map.json ./tg.js ./tg.bundle.js | |
deno compile --allow-all --unstable --target x86_64-unknown-linux-gnu --output ./dist/linux/x86_64/tg ./tg.bundle.js & | |
deno compile --allow-all --unstable --target x86_64-pc-windows-msvc --output ./dist/win/x86_64/tg ./tg.bundle.js & | |
deno compile --allow-all --unstable --target x86_64-apple-darwin --output ./dist/macos/x86_64/tg ./tg.bundle.js & | |
deno compile --allow-all --unstable --target aarch64-apple-darwin --output ./dist/macos/aarch64/tg ./tg.bundle.js & | |
- name: create package directory amd64 | |
run: | | |
mkdir -p .debpkg/usr/bin | |
cp ./dist/linux/x86_64/tg .debpkg/usr/bin/tg | |
ls -l .debpkg/usr/bin/tg | |
chmod 755 .debpkg/usr/bin/tg | |
- uses: jiro4989/build-deb-action@v2 | |
with: | |
package: tgcli | |
package_root: .debpkg | |
maintainer: twingate_lab | |
version: ${{ github.ref }} # refs/tags/v*.*.* | |
arch: 'amd64' | |
desc: 'This is a command line application demonstrating various usages of the Twingate API.' | |
- name: Compress cli_linux_x86_64 | |
uses: papeloto/action-zip@v1 | |
with: | |
files: ./dist/linux/x86_64/tg | |
dest: ./cli_linux_x86_64.zip | |
- name: Compress cli_win_x86_64 | |
uses: papeloto/action-zip@v1 | |
with: | |
files: ./dist/win/x86_64/tg.exe | |
dest: ./cli_win_x86_64.zip | |
- name: Compress cli_macos_x86_64 | |
uses: papeloto/action-zip@v1 | |
with: | |
files: ./dist/macos/x86_64/tg | |
dest: ./cli_macos_x86_64.zip | |
- name: Compress cli_macos_aarch64 | |
uses: papeloto/action-zip@v1 | |
with: | |
files: ./dist/macos/aarch64/tg | |
dest: ./cli_macos_aarch64.zip | |
- name: Get release | |
id: get_release | |
uses: bruceadams/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
- name: Upload linux_x86_64 | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
upload_url: ${{ steps.get_release.outputs.upload_url }} | |
asset_path: cli_linux_x86_64.zip | |
asset_name: cli_linux_x86_64.zip | |
asset_content_type: application/zip | |
- name: Upload cli_win_x86_64 | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
upload_url: ${{ steps.get_release.outputs.upload_url }} | |
asset_path: cli_win_x86_64.zip | |
asset_name: cli_win_x86_64.zip | |
asset_content_type: application/zip | |
- name: Upload cli_macos_x86_64 | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
upload_url: ${{ steps.get_release.outputs.upload_url }} | |
asset_path: cli_macos_x86_64.zip | |
asset_name: cli_macos_x86_64.zip | |
asset_content_type: application/zip | |
- name: Upload cli_macos_aarch64 | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
upload_url: ${{ steps.get_release.outputs.upload_url }} | |
asset_path: cli_macos_aarch64.zip | |
asset_name: cli_macos_aarch64.zip | |
asset_content_type: application/zip | |
- name: Upload tgcli_debian | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
upload_url: ${{ steps.get_release.outputs.upload_url }} | |
asset_path: tgcli_${{ steps.get_version.outputs.version-without-v }}_amd64.deb | |
asset_name: tgcli_${{ steps.get_version.outputs.version-without-v }}_amd64.deb | |
asset_content_type: application/vnd.debian.binary-package | |