Skip to content

Commit

Permalink
ci: add handling of segment API key
Browse files Browse the repository at this point in the history
  • Loading branch information
f1ames committed Nov 27, 2023
1 parent ba28c25 commit ae5f78e
Showing 1 changed file with 30 additions and 20 deletions.
50 changes: 30 additions & 20 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ jobs:
release:
runs-on: ubuntu-latest

env:
JOB_VARIABLE: 12345

steps:
- uses: actions/checkout@v4

Expand All @@ -19,6 +22,13 @@ jobs:

- run: npm i

- name: Add Segment key
env:
TEST_SECRET: ${{ secrets.TEST_SECRET }}
run: printf "export const SEGMENT_API_KEY = '%s';" "$TEST_SECRET" > src/config.ts

- run: cat src/config.ts

- name: Publish to marketplace
id: publishPackage
uses: HaaLeo/publish-vscode-extension@v1
Expand All @@ -27,23 +37,23 @@ jobs:
registryUrl: https://marketplace.visualstudio.com
dryRun: true

- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: 0.0.1 #${{ github.ref }}
release_name: Release 0.0.1 #Release ${{ github.ref }}
draft: true # false
prerelease: false

- name: Upload extension package
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.publishPackage.outputs.vsixPath }}
asset_name: monokle.vsix
asset_content_type: application/octet-stream
# - name: Create GitHub Release
# id: create_release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# tag_name: 0.0.1 #${{ github.ref }}
# release_name: Release 0.0.1 #Release ${{ github.ref }}
# draft: true # false
# prerelease: false

# - name: Upload extension package
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# asset_path: ${{ steps.publishPackage.outputs.vsixPath }}
# asset_name: monokle.vsix
# asset_content_type: application/octet-stream

0 comments on commit ae5f78e

Please sign in to comment.