-
Notifications
You must be signed in to change notification settings - Fork 14
58 lines (53 loc) · 1.58 KB
/
snap-store-publish-to-candidate.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: 📦 Publish to candidate
on:
# Run the workflow each time new commits are pushed to the candidate branch.
push:
branches: [ "candidate" ]
# Allow the workflow to be started manually from the Actions tab.
workflow_dispatch:
# Allow the workflow to be started by another workflow.
workflow_call:
secrets:
SNAP_STORE_CANDIDATE:
required: true
# Permissions for GITHUB_TOKEN
permissions:
contents: read
issues: write
env:
# Use the name of the repo as the name of the snap
SNAP_NAME: ${{ github.event.repository.name }}
# Hardcoded git branch and Snap Store channel channel
CHANNEL: 'candidate'
jobs:
build:
name: "Build and publish snap"
environment: "Candidate Branch"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ env.CHANNEL }}
- uses: snapcore/action-build@v1
id: build
- uses: diddlesnaps/snapcraft-review-action@v1
with:
snap: ${{ steps.build.outputs.snap }}
isClassic: 'false'
- uses: snapcore/action-publish@v1
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAP_STORE_CANDIDATE }}
with:
snap: ${{ steps.build.outputs.snap }}
release: ${{ env.CHANNEL }}
create_issue:
name: "Create call for testing"
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: JasonEtco/create-an-issue@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
filename: .github/testing-issue-template.md