-
Notifications
You must be signed in to change notification settings - Fork 14
65 lines (62 loc) · 2.08 KB
/
obs.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
59
60
61
62
63
64
name: Build and Release
on:
workflow_dispatch:
jobs:
build_obs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: install OBS tools
env:
OBS_USERNAME: ${{ secrets.OBS_USERNAME }}
OBS_PASSWORD: ${{ secrets.OBS_PASSWORD }}
run: |
curl -s "https://build.opensuse.org/projects/openSUSE:Tools/public_key" | sudo apt-key add -
sudo sh -c 'echo "deb http://download.opensuse.org/repositories/openSUSE:/Tools/xUbuntu_$(lsb_release -rs)/ ./" >> /etc/apt/sources.list.d/openSUSE-tools.list'
sudo apt-get -y update
sudo apt-get -y install osc
mkdir -p ~/.config/osc
cat > ~/.config/osc/oscrc << EOL
[general]
apiurl = https://api.opensuse.org
[https://api.opensuse.org]
user=$OBS_USERNAME
pass=$OBS_PASSWORD
credentials_mgr_class=osc.credentials.PlaintextConfigFileCredentialsManager
EOL
- name: Get tag
id: tag
uses: dawidd6/action-get-tag@v1
- name: Build and fetch binaries on OBS
env:
OBS_PROJECT: ${{ secrets.OBS_PROJECT }}
OBS_PACKAGE: ${{ secrets.OBS_PACKAGE }}
MERLIN_VERSION: ${{ steps.tag.outputs.tag }}
run: .github/make-release.sh
- uses: actions/upload-artifact@v2
with:
name: obs-binaries
path: release_archives/*.tar.xz
make_release:
runs-on: ubuntu-latest
needs:
- build_obs
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/download-artifact@v2
with:
name: obs-binaries
- name: Extract release notes
id: extract-release-notes
uses: ffurrer2/extract-release-notes@v1
- name: Release
uses: softprops/action-gh-release@v1
with:
body: ${{ steps.extract-release-notes.outputs.release_notes }}
- name: Upload release binaries
uses: alexellis/upload-assets@0.2.2
env:
GITHUB_TOKEN: ${{ github.token }}
with:
asset_paths: '["./*.tar.xz"]'