1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-09 09:51:02 +01:00
bitwarden-browser/.github/workflows/deploy.yml

58 lines
1.5 KiB
YAML
Raw Normal View History

2021-01-26 23:21:24 +01:00
name: Deploy
on:
release:
types:
- prereleased
jobs:
2021-01-26 23:42:04 +01:00
setup:
2021-01-26 23:21:24 +01:00
runs-on: ubuntu-latest
2021-01-26 23:42:04 +01:00
outputs:
package_version: ${{ steps.get_pkg_version.outputs.package_version }}
2021-01-27 00:53:21 +01:00
tag_version: ${{ steps.get_pkg_version.outputs.tag_version }}
2021-01-26 23:21:24 +01:00
steps:
- name: Checkout Repo
uses: actions/checkout@v2
2021-01-26 23:42:04 +01:00
- name: Get package version
id: get_pkg_version
run: |
TAG_VERSION=$(echo ${{ github.ref }} | cut -d "/" -f 3)
PKG_VERSION=${TAG_VERSION:1}
2021-01-26 23:49:46 +01:00
echo "::set-output name=package_version::$PKG_VERSION"
2021-01-27 00:35:25 +01:00
echo "::set-output name=tag_version::$TAG_VERSION"
2021-01-26 23:42:04 +01:00
linux:
runs-on: ubuntu-latest
2021-01-26 23:49:46 +01:00
needs: setup
2021-01-26 23:42:04 +01:00
steps:
- name: Checkout Repo
uses: actions/checkout@v2
2021-01-26 23:49:46 +01:00
#- name: Install Snap
# uses: samuelmeuli/action-snapcraft@v1
# with:
# snapcraft_token: ${{ secrets.SNAP_TOKEN }}
2021-01-26 23:42:04 +01:00
- name: Get snap release asset
uses: dsaltares/fetch-gh-release-asset@master
with:
2021-01-27 00:35:25 +01:00
version: ${{ env.TAG_VERSION }}
file: bitwarden_${{ env.PKG_VERSION }}_amd64.snap
token: ${{ secrets.GITHUB_TOKEN }}
2021-01-26 23:49:46 +01:00
env:
2021-01-27 00:00:22 +01:00
PKG_VERSION: ${{ needs.setup.outputs.package_version }}
2021-01-27 00:35:25 +01:00
TAG_VERSION: ${{ needs.setup.outputs.tag_version }}
2021-01-26 23:21:24 +01:00
- name: testing
run: ls -atlh
2021-01-26 23:49:46 +01:00
#- name: Deploy to Snap Store
# run: |
# snapcraft upload dist/bitwarden_${{ env.PACKAGE_VERSION }}_amd64.snap --release stable
# snapcraft logout
2021-01-26 23:42:04 +01:00