Skip to content

Merge pull request #159 from apollographql/examples #65

Merge pull request #159 from apollographql/examples

Merge pull request #159 from apollographql/examples #65

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [main]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'
check-latest: true
#Bump version
- name: 'Automated Version Bump'
id: version-bump
uses: 'phips28/gh-action-bump-version@master'
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
#Setup project and package extension
- run: npm install
- run: npm install vsce -g
- run: npm run vscode:package
#Create new release
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
with:
tag_name: ${{ steps.version-bump.outputs.newTag }}
release_name: Release ${{ steps.version-bump.outputs.newTag }}
draft: false
prerelease: false
#Upload VSIX to release
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./apollo-workbench-${{ steps.version-bump.outputs.newTag }}.vsix
asset_name: apollo-workbench-vscode-${{ steps.version-bump.outputs.newTag }}.vsix
asset_content_type: application/vsix