Skip to content

Commit 22b6856

Browse files
authored
Adding build and release yml files. (#6)
* Adding build and release yml files.
1 parent ce137d4 commit 22b6856

File tree

3 files changed

+70
-1
lines changed

3 files changed

+70
-1
lines changed

.github/workflows/build.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: [ "master", "dev" ]
6+
pull_request:
7+
branches: [ "master", "dev" ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: macos-latest
13+
14+
steps:
15+
- uses: actions/checkout@v3
16+
- uses: webfactory/[email protected]
17+
with:
18+
ssh-private-key: |
19+
${{ secrets.DEPLOY_KEY_EDGE_FN_SWIFT }}
20+
${{ secrets.DEPLOY_KEY_SUBSTRATA_SWIFT }}
21+
- name: Build
22+
run: swift build -v
23+
- name: Run tests
24+
run: swift test -v
25+

.github/workflows/release.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "*.*.*"
7+
8+
permissions: write-all
9+
10+
jobs:
11+
release:
12+
runs-on: macos-latest
13+
environment: deployment
14+
steps:
15+
- uses: actions/checkout@v3
16+
- uses: webfactory/[email protected]
17+
with:
18+
ssh-private-key: |
19+
${{ secrets.DEPLOY_KEY_EDGE_FN_SWIFT }}
20+
${{ secrets.DEPLOY_KEY_SUBSTRATA_SWIFT }}
21+
- name: Get tag
22+
id: vars
23+
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
24+
- name: Build
25+
run: swift build -v
26+
- name: Run tests
27+
run: swift test -v
28+
- name: GH Release
29+
# You may pin to the exact commit or the version.
30+
# uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844
31+
# see: https://github.com/softprops/action-gh-release
32+
uses: softprops/[email protected]
33+
with:
34+
body: "Release of version ${{ env.RELEASE_VERSION }}"
35+
name: ${{ env.RELEASE_VERSION }}
36+
tag_name: ${{ env.RELEASE_VERSION }}
37+
draft: false
38+
prerelease: false
39+
files:
40+
"./.build/debug/segmentcli"
41+
fail_on_unmatched_files: false
42+
token: ${{ secrets.GITHUB_TOKEN }}
43+
generate_release_notes: true
44+
append_body: false

Tests/segmentcliTests/segmentcliTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import XCTest
22
import class Foundation.Bundle
33

44
final class segmentcliTests: XCTestCase {
5-
func testExample() throws {
5+
func skipped_testExample() throws {
66
// This is an example of a functional test case.
77
// Use XCTAssert and related functions to verify your tests produce the correct
88
// results.

0 commit comments

Comments
 (0)