-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.build.xml
43 lines (32 loc) · 1.91 KB
/
example.build.xml
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
<?xml version="1.0"?>
<project name="PhingGitHub example" default="create-release-assets" basedir="."
description="This is an example buildfile for GitHub Phing tasks.">
<target name="init-auth">
<propertyprompt promptText="Enter your GitHub username?" propertyName="username" useExistingValue="true"/>
<propertyprompt promptText="Enter your GitHub password?" propertyName="password" useExistingValue="true"/>
</target>
<target name="init-repo">
<propertyprompt promptText="Enter owner of the repository to work from" propertyName="owner" useExistingValue="true"/>
<propertyprompt promptText="Enter name of the repository to work from" propertyName="repo" useExistingValue="true"/>
</target>
<target name="create-release" depends="init-auth, init-repo">
<taskdef name="GitHubCreateRelease" classname="PhingGitHub\CreateReleaseTask" classpath="src" />
<php expression="'test-' . rand();" returnProperty="random"/>
<GitHubCreateRelease username="${username}" password="${password}" authMethod="password" owner="${owner}" repository="${repo}"
tagName="${random}" commitish="master" releaseId="release" />
</target>
<target name="create-release-assets" depends="init-auth, init-repo, create-release">
<taskdef name="GitHubCreateAssets" classname="PhingGitHub\CreateAssetsTask" classpath="src" />
<append destFile="${random}.txt" text="This is a test for ${random}"/>
<GitHubCreateAssets username="${username}" password="${password}" authMethod="password" owner="${owner}" repository="${repo}" releaseId="${release}">
<fileset dir=".">
<include name="test-*.txt"/>
</fileset>
</GitHubCreateAssets>
<delete>
<fileset dir=".">
<include name="test-*.txt"/>
</fileset>
</delete>
</target>
</project>