Skip to content

Commit

Permalink
0.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
inercia committed Dec 6, 2020
1 parent 7af048c commit bbdc16c
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 9 deletions.
45 changes: 40 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,61 @@ jobs:
name: Create and Upload Release
runs-on: ubuntu-latest
steps:

- name: Build info
id: info
run: |
echo ::set-output name=SOURCE_NAME::${GITHUB_REF#refs/*/}
echo ::set-output name=SOURCE_BRANCH::${GITHUB_REF#refs/heads/}
echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
- name: Checkout code
uses: actions/checkout@v2

- name: Setup node
uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://npm.pkg.github.com/

- run: npm install
- run: npm test

# - name: Authenticate against GitHub package registry
# run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > ~/.npmrc

- name: Setup GIT
run: |
git switch -c main
git config --global user.email "[email protected]"
git config --global user.name "Alvaro Saurin"
- name: Set release version
run: npm version ${{ github.ref }}
run: npm version --allow-same-version ${{ steps.info.outputs.SOURCE_TAG }}

- name: Create package project
uses: lannonbr/vsce-action@master
with:
args: "package -o vscode-k3d-${{ github.ref }}.vsix"
args: "package -o vscode-k3d-${{ steps.info.outputs.SOURCE_TAG }}.vsix"
env:
VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }}

- name: Changelog
uses: scottbrenner/generate-changelog-action@master
id: changelog
env:
REPO: ${{ github.repository }}

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
tag_name: ${{ steps.info.outputs.SOURCE_TAG }}
release_name: Release ${{ steps.info.outputs.SOURCE_TAG }}
body: |
${{ steps.changelog.outputs.changelog }}
draft: false
prerelease: false

Expand All @@ -44,8 +78,9 @@ jobs:
# 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
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./vscode-k3d-${{ github.ref }}.vsix
asset_path: ./vscode-k3d-${{ steps.info.outputs.SOURCE_TAG }}.vsix
asset_name: vscode-k3d.vsix
asset_content_type: application/zip

# - name: Publish package to marketplace
# uses: lannonbr/vsce-action@master
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vscode-k3d",
"displayName": "Kubernetes k3d",
"description": "Work with the k3d local Kubernetes provider in Visual Studio Code",
"version": "0.0.3",
"version": "0.0.1",
"preview": true,
"publisher": "ms-kubernetes-tools",
"engines": {
Expand Down Expand Up @@ -74,10 +74,8 @@
"compile": "webpack --mode none",
"watch": "webpack --mode none --watch",
"postinstall": "node ./node_modules/vscode/bin/install",

"test": "npm run compile && node ./node_modules/vscode/bin/test",
"test-compile": "tsc -p ./",

"vscode:prepublish": "webpack --mode production",
"dist": "vsce package",
"dist-tools": "npm install -g vsce"
Expand Down

0 comments on commit bbdc16c

Please sign in to comment.