mirror of https://git.tuxpa.in/a/code-server.git
114 lines
3.6 KiB
YAML
114 lines
3.6 KiB
YAML
name: release
|
|
on:
|
|
push:
|
|
# tags:
|
|
# - 'v*'
|
|
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
jobs:
|
|
linux-amd64:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: Get yarn cache directory path
|
|
id: yarn-cache-dir-path
|
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
- uses: actions/cache@v1
|
|
with:
|
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-yarn-
|
|
|
|
- name: Run release.sh
|
|
uses: ./ci/image
|
|
with:
|
|
args: yarn && yarn vscode && ./ci/release.sh
|
|
env:
|
|
PACKAGE: true
|
|
- name: Get release name
|
|
id: get-release-name
|
|
run: echo "::set-output name=name::$(cd release && ls *.tar.gz)"
|
|
|
|
- name: Upload release as artifact
|
|
uses: actions/upload-artifact@master
|
|
with:
|
|
name: ${{ steps.get-release-name.outputs.name }}
|
|
path: release/${{ steps.get-release-name.outputs.name }}
|
|
|
|
- name: Create Release
|
|
id: create-release
|
|
uses: actions/create-release@v1
|
|
with:
|
|
tag_name: v2.1.0
|
|
release_name: Release v2.1.0
|
|
draft: true
|
|
- name: Upload release
|
|
id: upload-release-asset
|
|
uses: actions/upload-release-asset@v1
|
|
with:
|
|
upload_url: ${{ steps.create-release.outputs.upload_url }}
|
|
asset_name: ${{ steps.get-release-name.outputs.name }}
|
|
asset_path: release/${{ steps.get-release-name.outputs.name }}
|
|
asset_content_type: application/gzip
|
|
|
|
- name: Copy release into release image build context
|
|
uses: ./ci/image
|
|
with:
|
|
args: cp release/${{ steps.get-release-name.outputs.name }} ci/release-image
|
|
- name: Publish codercom/code-server docker container
|
|
uses: elgohr/Publish-Docker-Github-Action@master
|
|
with:
|
|
name: codercom/code-server
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
context: ci/release-image
|
|
tags: "anmol"
|
|
|
|
macos:
|
|
runs-on: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: Get yarn cache directory path
|
|
id: yarn-cache-dir-path
|
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
- uses: actions/cache@v1
|
|
with:
|
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-yarn-
|
|
|
|
- name: Run release.sh
|
|
run: yarn && yarn vscode && ./ci/release.sh
|
|
env:
|
|
PACKAGE: true
|
|
- name: Get release name
|
|
id: get-release-name
|
|
run: echo "::set-output name=name::$(cd release && ls *.zip)"
|
|
|
|
- name: Upload release as artifact
|
|
uses: actions/upload-artifact@master
|
|
with:
|
|
name: ${{ steps.get-release-name.outputs.name }}
|
|
path: release/${{ steps.get-release-name.outputs.name }}
|
|
|
|
- name: Create Release
|
|
id: create-release
|
|
uses: actions/create-release@v1
|
|
with:
|
|
tag_name: v2.1.0
|
|
release_name: Release v2.1.0
|
|
draft: true
|
|
- name: Upload release
|
|
uses: actions/upload-release-asset@v1
|
|
with:
|
|
upload_url: ${{ steps.create-release.outputs.upload_url }}
|
|
asset_name: ${{ steps.get-release-name.outputs.name }}
|
|
asset_path: release/${{ steps.get-release-name.outputs.name }}
|
|
asset_content_type: application/zip
|