1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-09-18 02:41:15 +02:00

adding path to download to

This commit is contained in:
Joseph Flinn 2021-01-28 18:59:07 +00:00
parent 975f79697c
commit 1a2e033671

View File

@ -6,56 +6,52 @@ on:
release_tag_name_input: release_tag_name_input:
description: "Release Tag Name <X.X.X>" description: "Release Tag Name <X.X.X>"
required: true required: true
#release: release:
#types: types:
#- prereleased - prereleased
jobs: jobs:
setup: setup:
runs-on: ubuntu-latest runs-on: ubuntu-latest
outputs: outputs:
#package_version: ${{ steps.get_pkg_version.outputs.package_version }}
#tag_version: ${{ steps.get_pkg_version.outputs.tag_version }}
package_version: ${{ steps.create_tags.outputs.package_version }} package_version: ${{ steps.create_tags.outputs.package_version }}
tag_version: ${{ steps.create_tags.outputs.tag_version }} tag_version: ${{ steps.create_tags.outputs.tag_version }}
steps: steps:
- name: Checkout Repo - name: Checkout Repo
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Create Release Vars - name: Create Deploy version vars
id: create_tags id: create_tags
run: | run: |
case "${RELEASE_TAG_NAME_INPUT:0:1}" in if [[ "${{ github.ref}}" -eq "release" ]]; then
v) case "${RELEASE_TAG_NAME_INPUT:0:1}" in
echo "RELEASE_NAME=${RELEASE_TAG_NAME_INPUT:1}" >> $GITHUB_ENV v)
echo "RELEASE_TAG_NAME=$RELEASE_TAG_NAME_INPUT" >> $GITHUB_ENV echo "RELEASE_NAME=${RELEASE_TAG_NAME_INPUT:1}" >> $GITHUB_ENV
echo "::set-output name=package_version::${RELEASE_TAG_NAME_INPUT:1}" echo "RELEASE_TAG_NAME=$RELEASE_TAG_NAME_INPUT" >> $GITHUB_ENV
echo "::set-output name=tag_version::$RELEASE_TAG_NAME_INPUT" echo "::set-output name=package_version::${RELEASE_TAG_NAME_INPUT:1}"
;; echo "::set-output name=tag_version::$RELEASE_TAG_NAME_INPUT"
[0-9]) ;;
echo "RELEASE_NAME=$RELEASE_TAG_NAME_INPUT" >> $GITHUB_ENV [0-9])
echo "RELEASE_TAG_NAME=v$RELEASE_TAG_NAME_INPUT" >> $GITHUB_ENV echo "RELEASE_NAME=$RELEASE_TAG_NAME_INPUT" >> $GITHUB_ENV
echo "::set-output name=package_version::$RELEASE_TAG_NAME_INPUT" echo "RELEASE_TAG_NAME=v$RELEASE_TAG_NAME_INPUT" >> $GITHUB_ENV
echo "::set-output name=tag_version::v$RELEASE_TAG_NAME_INPUT" echo "::set-output name=package_version::$RELEASE_TAG_NAME_INPUT"
;; echo "::set-output name=tag_version::v$RELEASE_TAG_NAME_INPUT"
*) ;;
exit 1 *)
;; exit 1
esac ;;
esac
else
TAG_VERSION=$(echo ${{ github.ref }} | cut -d "/" -f 3)
PKG_VERSION=${TAG_VERSION:1}
echo "::set-output name=package_version::$PKG_VERSION"
echo "::set-output name=tag_version::$TAG_VERSION"
fi
env: env:
RELEASE_TAG_NAME_INPUT: ${{ github.event.inputs.release_tag_name_input }} RELEASE_TAG_NAME_INPUT: ${{ github.event.inputs.release_tag_name_input }}
- name: Get package version
if: false
id: get_pkg_version
run: |
TAG_VERSION=$(echo ${{ github.ref }} | cut -d "/" -f 3)
PKG_VERSION=${TAG_VERSION:1}
echo "::set-output name=package_version::$PKG_VERSION"
echo "::set-output name=tag_version::$TAG_VERSION"
snap: snap:
name: Publish Snap name: Publish Snap
@ -130,7 +126,7 @@ jobs:
with: with:
mode: download mode: download
tag_name: ${{ env.TAG_VERSION }} tag_name: ${{ env.TAG_VERSION }}
assets: bitwarden-cli.${{ env.PKG_VERSION }}.nupkg assets: bitwarden-cli.${{ env.PKG_VERSION }}.nupkg|./dist/bitwarden-cli.${{ env.PKG_VERSION }}.nupkg
github_token: ${{ secrets.GITHUB_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }}
@ -138,8 +134,9 @@ jobs:
shell: pwsh shell: pwsh
run: | run: |
# In place of ./scripts/choco-update.ps1 # In place of ./scripts/choco-update.ps1
New-Item -ItemType directory -Path ./dist
Move-Item -Path bitwarden.${{ env.PKG_VERSION }}.nupkg -Destination ./dist #New-Item -ItemType directory -Path ./dist
#Move-Item -Path bitwarden-cli.${{ env.PKG_VERSION }}.nupkg -Destination ./dist
cd ./dist cd ./dist
#choco push #choco push