Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Packaging #4

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
49 changes: 31 additions & 18 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ stages:
- template: .azure/build-test.yml # Template reference

- stage: build
condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')
#condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')
jobs:
- template: .azure/build-template.yml # Template reference
parameters:
Expand All @@ -31,26 +31,39 @@ stages:
artifact: macos
runtime: osx-x64

- stage: github
condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')
# - stage: github
# #condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')
# jobs:
# - job: release
# steps:
# - checkout: none
# - task: DownloadPipelineArtifact@2
# inputs:
# buildType: 'current'
# targetPath: '$(Pipeline.Workspace)'
# - task: GitHubRelease@0
# inputs:
# gitHubConnection: 'github.com'
# repositoryName: 'mattiascibien/image-search-bot'
# tagSource: manual
# tag: v$(Build.BuildNumber)
# title: Release v$(Build.BuildNumber)
# assets: '$(Pipeline.Workspace)/**/*.zip'
# isDraft: false
# addChangeLog: true

- stage: snap
#condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')
jobs:
- job: github_release
- job: release
steps:
- checkout: none
- task: DownloadPipelineArtifact@2
inputs:
buildType: 'current'
targetPath: '$(Pipeline.Workspace)'
- task: GitHubRelease@0
- bash: docker pull snapcore/snapcraft:stable
- bash: docker run -v "$PWD":/build --net=host -w /build snapcore/snapcraft:stable snapcraft
- bash: mv *.snap $(build.artifactstagingdirectory)
- task: PublishBuildArtifacts@1
inputs:
gitHubConnection: 'github.com'
repositoryName: 'mattiascibien/image-search-bot'
tagSource: manual
tag: v$(Build.BuildNumber)
title: Release v$(Build.BuildNumber)
assets: '$(Pipeline.Workspace)/**/*.zip'
isDraft: false
addChangeLog: true
PathtoPublish: '$(build.artifactstagingdirectory)'
ArtifactName: 'snap'

- stage: docker
condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')
Expand Down
16 changes: 16 additions & 0 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: image-search-bot
version: git
summary: Configurable Telegram Bots that respond to image queries
description: |
Configurable apps for running Telegram Bots that responds to photo Image Queries
grade: stable
confinement: strict

apps:
image-search-bot:
command: image-search-bot

parts:
image-search-bot:
source: .
plugin: dotnet